PreviousNext

Operations on Exceptions

An exception is an object that describes an error condition. Operations on exception objects allow errors to be reported and handled. If an exception is handled properly, the program can recover from errors. For example, if an exception is raised from a parity error while reading a tape, the recovery action may be to retry 100 times before giving up.

The DCE Threads exception-returning interface allows you to perform the following operations on exceptions:

· Declare and initialize an exception object

· Raise an exception

· Define a region of code over which exceptions are caught

· Catch a particular exception or all exceptions

· Define epilogue actions for a block

· Import a system-defined error status into the program as an exception

These operations are discussed in the following topics.

More:

Declaring and Initializing an Exception Object

Raising an Exception

Defining a Region of Code over Which Exceptions Are Caught

Catching a Particular Exception or All Exceptions

Defining Epilogue Actions for a Block

Importing a System-Defined Error Status into the Program as an Exception