(setq i 0 j 0)
(loop (incf j 3) (incf i)
(if (= i 3) (throw 'result (values i j))))) 3, 9
(unwind-protect (throw nil 1)
(throw nil 2))) 2
The consequences of the following are undefined
because the catch of b
is passed over by the first throw,
hence portable programs must assume that
its dynamic extent is terminated.
The binding of the catch tag is not yet disestablished
and therefore it is the target of the second throw.
(unwind-protect (throw 'a 1)
(throw 'b 2))))
The following prints "The inner catch returns :SECOND-THROW"
and then returns :outer-catch.
(format t "The inner catch returns ~s.~%"
(unwind-protect (throw 'foo :first-throw)
(throw 'foo :second-throw))))
The inner catch returns :SECOND-THROW