Raises an error.
This function does not generate a change.
raise([error])
Argument | Type | Description |
---|---|---|
value | error/str (optional) | The error to raise. |
None
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';