Catch
Evaluates an expression, recovering the value of any Throw inside it.
✓ checked against that system · ! checked, with disagreements (hover a chip)Wolfram Language
Catch✓Catch(expr)'s value, or (if a Throw happened while evaluating it) the value that carried.Catch(expr, tag)Like , but only catches a whose tag matches exactly — any other (untagged, or a different tag) propagates past this .Typed signatures
| Type | Package | Applies |
|---|---|---|
(any, any?) -> any | combinatorics | always |
Details
- Only exact tag equality is matched, not Wolfram's fuller pattern-matching form.
- An error that is not one of our own s is never caught here — it propagates as a normal error would.
Examples
Scope #
About
| Examples | 10 |
|---|---|
| Checked against | Wolfram Language 10 agree |
| Crosswalk | Wolfram Language |
See also: Throw