throw
throw(
s_tag
g_value
)
=>
Description
Transfers the control back to the return point established in a catch block. The argument value is used as the value to be passed. The throw function should always be used inside catch(. . . g_form . . .).
Arguments
|
Evaluates forms and saves the results. If the form produces multiple values, then all the values are saved. The saved results are returned as the value or values of catch. |
Value Returned
Transfers the control back to the return point in a catch block
Examples
catch( 'problem begin( throw( 'problem
let( nil
printf( "Caught %L\n" 1) 1
)
)
2
)
)
Caught 1 ; message is printed . . .
=> 1 ; value returned by throw()
Return to top