raise flow control statement 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
raise keyword can be used in two ways.
raise is followed by an expression that provides an exception instance. That instance (typically of type
Exception or a sub-type, but any Object can be raised, in theory) will travel up the stack, and will be available to all exception handlers, providing details about the exception that occurred.
except block, the
raise keyword can be used on its own; it will the re-raise the exception currently being handled.
raise new ArgumentException('Invalid parameter!');