The function find-throw-tag
is the predicate for whether there is a catch in the dynamic scope with the supplied catch tag tag, so that cl:throw
will succeed to throw to it.
find-throw-tag
needs to traverse all the catch frames on the stack until it finds the tag, and therefore would be slower then checking a dynamically bound variable. If the check needs to be called often, then it is normally better to bind a special variable when the catch is established, and then check that variable. In situations when the check is rare (for example, it is called only in cases of error), using find-throw-tag
is better because it eliminates the overhead of binding the special.
LispWorks User Guide and Reference Manual - 20 Sep 2017