Fuzion Logo
fuzion-lang.dev — The Fuzion Language Portal
JavaScript seems to be disabled. Functionality is limited.

try

try

try -- simple exception effect

try provides an operation 'raise' that immediately stops execution and
returns an 'error' wrapped in an 'outcome'.

Functions

install this effect and execute 'f'. Wrap the result of 'f' into an
'outcome' if 'f' returns normally, otherwise if 'f' is aborted early
via a call to 'raise' wrap the 'error' passed to 'raise' into the
resulting 'outcome'.
terminate immediately with the given error wrapped in 'option'.