raise

Raises an error.

This function does not generate a change.

Function

raise([error])

Arguments

Argument Type Description
value error/str (optional) The error to raise.

Return value

None

Example

Some examples on how raise() can be used:

raise ();  // raise a default error
'This code is not reached';
raise ('no licenses left');  // raise with a custom message
'This code is not reached';
raise (value_err());  // raise a value error
'This code is not reached';