Viewing the Exception Handler Stack

You can execute the getExceptionHandlerStack method of the Process class to populate a transient array with transient ExceptionHandlerDesc objects that represent the exception handlers armed by the current process in the current node.

In the array, locally armed exception handlers precede globally armed exception handlers. Within this grouping, the most recently armed exception handlers occur first.

The following example shows the use of the getExceptionHandlerStack method to display the exception handler stack.

showArmedExceptionHandlers()
vars
    oa: ObjectArray;
    o:  Object;
begin
    create oa transient;
    process.getExceptionHandlerStack(oa);
    foreach o in oa do
        write o.display;
    endforeach;
epilog
    oa.purge;
    delete oa;
end;

The getExceptionHandlerStack method can be called only on the current process.