Try OpenEdge Now
skip to main content
Object-oriented Programming
Programming with Class-based Objects : Raising and handling error conditions : Raising errors within a class event handler

Raising errors within a class event handler

Error handling for ABL class event handlers is a special case of error handling for methods in general. If a class event handler raises ERROR (in any way), it does so within the context of a statement that calls the Publish( ) event method on the event it is handling. Thus, any unhandled error condition from an event handler that includes the ROUTINE-LEVEL ON ERROR UNDO, THROW statement is raised on the statement that published the event. In addition, once an error condition is raised, any handlers for the event that have not yet executed do not execute.