[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: wip-signed-archives progress report
From: |
Ludovic Courtès |
Subject: |
Re: wip-signed-archives progress report |
Date: |
Fri, 28 Mar 2014 00:34:08 +0100 |
User-agent: |
Gnus/5.130007 (Ma Gnus v0.7) Emacs/24.3 (gnu/linux) |
Nikita Karetnikov <address@hidden> skribis:
>> Nikita: comments welcome on the two commits I just pushed in
>> wip-signed-archives.
>
> Thanks for working on it. One question: in the past, you told me to
> avoid ‘false-if-exception’. If it’s an issue here, can we replace it
> with something else?
What did I say? :-) (We have a saying in French: “do what I say, not
what I do”. ;-))
I used it in two places:
(false-if-exception
(and=> signature narinfo-signature->canonical-sexp))
and:
(define (valid-narinfo? narinfo)
"Return #t if NARINFO's signature is not valid."
(false-if-exception (begin (assert-valid-narinfo narinfo) #t)))
‘false-if-exception’ should indeed be used with care, because it hides
every error (including unbound var errors and such!), so it could be
hiding errors that really ought to be reported.
In the above cases I considered it OK, because the set of exceptions
that can possibly be raised is limited, and because the outcome of
‘false-if-exception’ is conservative (that is, at worst all narinfos
will be treated as if they were unsigned or invalid.)
Does it makes sense?
Ludo’.