[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: About `catch' and `throw'
From: |
Stefan Monnier |
Subject: |
Re: About `catch' and `throw' |
Date: |
Sat, 22 Dec 2012 12:50:12 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
> During the evaluation of code that is lexically inside the `catch',
> a `throw' that is evaluated throws back to that `catch'.
Usually, but not always.
> And if there is more than one `catch' with the same label then it
> throws to the one that is lexically nearest (i.e., innermost, outside
> the `throw'), which is also the most recent.
Usually, but not always:
(catch 'foo
(let ((f (lambda () (throw 'foo))))
...
(catch 'foo
(funcall f))
...))
will throw to the inner catch, not the outer one.
Stefan