Raise Expressions
Much like the regular raise
statement, the raise
expression will terminate the current scope by raising (or re-raising) an exception. The exception will bubble up the call stack, terminating all execution flow, until it is caught by a try
/except
block.
Different than the raise Statement, the raise
expression can be used in place of an expression of arbitrary type — for example in an if
/then
Expression or as parameter to coalesce()
:
var x := coalesce(a, b, c, raise new Exception('neiter a, b or c were assigned');