Try OpenEdge Now
skip to main content
Guide for New Developers
An overview of ABL : Understanding the ABL Class-based model and its members : Structured Error-handling
 

Structured Error-handling

Structured error-handling is an expansion of the original ABL error handling features, which are now referred to as traditional error handling features. While the new language features do provide you with a more robust error handling model, they coexist and inter-operate with the traditional error handling features. Existing code will continue to work as is, and code using the new model can work with this existing code.
Structured error-handling is a model used in many languages, but is typically associated with object-oriented languages. It is characterized by the following features:
*Represents all errors as objects (instances of a class)
*Allows you to define your own error types (classes)
*Allows you to explicitly raise (throw) an error
*Allows you to handle (catch) particular error types in a particular context (ABL block)
*Allows you to propagate (re-throw) errors from the current context (inner block) to the immediate outer context (outer block). In other words, when an error occurs in a called context, you can direct the calling context to handle the error
*Allows you to specify code that executes at the conclusion of some associated code, whether or not the associated code executed successfully (FINALLY block)
For more information, see the guide OpenEdge Development: Error Handling.