ignore-error ( ... quot: ( ... -- ... ) check: ( error -- ? ) -- ... )


Vocabulary
continuations

Inputs
quota quotation
checka quotation


Outputs
None

Word description
Calls the quotation. If an exception is thrown which is matched by the 'check' quotation it is ignored. Otherwise the error is rethrown.

Definition


: ignore-error
( ... quot: ( ... -- ... ) check: ( error -- ? ) -- ... )
[ [ dup ] ] dip [ [ drop ] [ rethrow ] if ] compose compose
recover ; inline