Try OpenEdge Now
skip to main content
Error Handling
Traditional Error Handling
 

Traditional Error Handling

ABL has always been a procedural, block-structured, database language with the ability to mix procedural, database, and user-interface logic in a single procedure file of statements, blocks, and nested blocks. The semantics of working with a database means ABL error handling protects persistent data above all with tight integration to transaction management. Error handling draws on ABL procedural strengths to provide flow-of-control options that increase the chance of restoring application flow after an error.
ABL has expanded to provide object-oriented programming, distributed programming, and extensive integration features with other features of the OpenEdge platform. Consequently, there are many specialized error-handling topics. The traditional error handling model provides an e asy-to-use set of features for general ABL programming. It also provides a standard way of communicating errors to ABL from integrated OpenEdge features. For example, a Web service returns errors as industry standard SOAP faults. The traditional error handling model lets your application handle a returned SOAP fault as an ABL system error.
To have a good working knowledge of the traditional error handling model, you should:
*Know how a particular statement handles an error
*Understand OpenEdge messages
*Know how a particular block handles an error (see ABL BlockEssentials)
*Know how to use block statement options to alter default error handling
*Know how to suppress system errors with the NO-ERROR option
*Know how to test for errors after a NO-ERROR option and branch to your custom error handling logic
*Know how to raise ERROR and specify an application (custom) error data
*Know how to explicitly undo transactions
*Understand STOP and QUIT condition processing (see STOPand QUIT Condition Handling)
This chapter provides task-oriented documentation on the ABL elements that comprise the traditional error handling model, organized and described in this chapter.
* Statement errors
* Understanding OpenEdge messages
* Specifying error handling behavior
* Suppressing errors
* Providing custom error handling
* Undoing work
* Raising the ERROR condition