Handbook
Glossary
ignore-error ( ... quot: ( ... -- ... ) check: ( error -- ? ) -- ... )
Vocabulary
continuations
Inputs
quot
a
quotation
check
a
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
USING:
kernel
;
IN:
continuations
:
ignore-error
( ... quot: ( ... -- ... ) check: ( error -- ? ) -- ... )
[
[
dup
]
]
dip
[
[
drop
]
[
rethrow
]
if
]
compose
compose
recover
;
inline