Try OpenEdge Now
skip to main content
Error Handling
Using ABL Error Classes : Progress.Lang.ProError class
 

Progress.Lang.ProError class

Progress.Lang.ProError is the ultimate super class for all ABL built-in and user-defined classes that represent errors in the ABL structured error handling model. You cannot directly inherit from this class, and the class constructors are reserved for system use only. The immediate subclasses of this class represent the two major types of classes in ABL:
*Progress.Lang.SysError represents any error generated by the AVM
*Progress.Lang.AppError represents any error your application defines
Progress.Lang.ProError inherits from Progress.Lang.Object and therefore inherits all the common methods and properties needed for managing user-defined objects in ABL. It also implements the Progress.Lang.Error interface, which provides all the properties and methods needed to interface with the ABL structured error handling model, as shown in Properties and methods table. This class provides the functionality to retrieve error messages, error numbers, and the contents of the error call stack.
A CATCH block that references this type handles all built-in and user defined errors, as shown:
DO ON ERROR UNDO, THROW:
  .
  .
  .
  CATCH anySystemOrAppErrorObject AS Progress.Lang.ProError:
    .
    .
    .
  END CATCH.
END. /* DO */