Previous Page | Next Page

Handling Exceptions

Introduction to SCL Exception Handling

SCL provides two mechanisms for handling error conditions:

The program halt handler

Program halt handlers typically allow your application to print a message, save some information, and then either try to continue execution or halt the application. The SCL generic program halt handler is sort of an all-purpose routine for handling program halts that occur for a variety of different reasons at any point in the program.

The CATCH and THROW statements

The SCL Exception class and the CATCH and THROW statements enable you to define specific exceptions and recovery routines that are specific to each exception. You can define the exceptions and recovery routines in the locations in your code where the exceptions may be encountered, thus making error recovery code a natural part of the program.

Previous Page | Next Page | Top of Page