All Manuals > LispWorks User Guide and Reference Manual > 38 The HCL Package

NextPrevUpTopContentsIndex

throw-if-tag-found

Macro
Summary

Throws to a specified catch tag or returns nil if the catch tag is not found.

Package

hcl

Signature

throw-if-tag-found catch-tag result-form => A non-local exit or nil

Arguments

catch-tag

A catch tag.

result-form

A Lisp form.

Description

The macro throw-if-tag-found checks whether it can find the catch tag catch-tag by using find-throw-tag. If it finds catch-tag it throws to catch-tag the value(s) of evaluating result-form. Otherwise throw-if-tag-found returns nil, without evaluating result-form.

The throwing operation is done by a normal throw. Therefore the only the difference between this and cl:throw is when the tag is not found. In this case, cl:throw would evaluate the result form and then give an error, but throw-if-tag-found simply returns nil.

See also

find-throw-tag


LispWorks User Guide and Reference Manual - 13 Feb 2015

NextPrevUpTopContentsIndex