Raising an exception reports an error not by returning a value, but by propagating the exception. Propagation involves searching all active scopes for code written to handle the error or code written to perform finalization actions in case of any error and causing that code to execute. If a scope does not define a handler or finalization block, then the scope is simply torn down as the exception propagates up the stack. This is sometimes referred to as unwinding the stack. Because DECthreads exceptions are terminating, there is no option to make execution resume at the point of the error. (Execution resumes at the point where the exception is caught.)
If an exception is unhandled, the process is terminated. Note that on OpenVMS systems, DECthreads exceptions are raised using LIB$STOP, which always sets the condition code to a level of SEVERE (4). Termination prevents the unhandled error from affecting other areas of the program.
An example of raising an exception is as follows:
RAISE (parity_error);