Skip to main content

Throw

Throw[value] stops evaluation and returns value as the value of the nearest enclosing Catch.

Throw[value,tag] is caught only by Catch[expr,form], where tag matches form.

Throw[value,tag,f] returns f[value,tag] as the top-level value if no appropriate Catch is found.

Please visit the official Wolfram Language Reference for more details and examples on core symbols.