[Return to Bookshelf] [Contents] [Previous Section] [Next Section] [Index] [Help]


5.1.2 Terminating Exception Semantics

DECthreads exceptions are terminating exceptions. This means that control never returns to the instruction following a RAISE statement. When an exception occurs because of a hardware condition such as an illegal address, execution cannot be resumed at the failing instruction. An exception causes execution of handlers that have been declared (starting with the most recently declared handler and proceeding backwards) until a CATCH or CATCH_ALL clause is reached that does not end with RERAISE. At this point, execution continues at the first statement beyond the ENDTRY that terminates that current handler.


Note
On OpenVMS systems, all exceptions are of SEVERE (FATAL) severity. When you set the status of an exception using pthread_exc_set_status_np DECthreads will set the severity field to SEVERE (4) . Also, DECthreads raises exceptions (RAISE or pthread_exc_raise_status_np) using LIB$STOP, that also sets the severity to SEVERE. Finally, the CATCH, CATCH_ALL, and FINALLY macros cannot be used to handle any status exception that is not a SEVERE severity level.