Progress.Lang.AppError class

Progress.Lang.AppError is the super class of all application errors. An application error is simply any collection of data you need to provide necessary information about a condition.

An application error can be raised either by using the RETURN ERROR or the UNDO, THROW statement.

The following figure represents the hierarchy of ABL classes that provide Progress.Lang.AppError with all its features:



Progress.Lang.ProError is the super class of all error objects in ABL. From Progress.Lang.Object it inherits the basic features of an ABL class. It also implements the Progress.Lang.Error interface which provides the basic properties and methods for handling errors.

Progress.Lang.AppError adds the properties and methods needed for populating an AppError object with your error messages.

You can create your own hierarchy of more complex AppError types by creating subclasses of AppError.

When the AVM encounters the RETURN ERROR statement, it implicitly throws a Progress.Lang.AppError object and places any error string in the object's ReturnValue property. ReturnValue is included in the AppError object to provide a bridge between the older functionality of RETURN ERROR ErrorString and error objects. See OpenEdge Development: ABL Error Handling, for more information.

Serializable:

Yes

Constructors

The following is the default constructor. This constructor creates an AppError object with an empty message list and does not set any properties.

PUBLIC AppError ( )

The following constructor creates an AppError object and assigns the first message on the object with the values from the ErrorMessage and MessageNumber arguments. It also sets the NumMessages property to 1. This error message and message number can be accessed with the GetMessage(1) and GetMessageNum(1) methods.

PUBLIC AppError ( INPUT ErrorMessage  AS CHARACTER 
                  INPUT MessageNumber AS INTEGER )

The following constructor creates an AppError object with the ReturnValue property set with the value of the ReturnValue parameter. This constructor is used when the AVM implicitly creates an AppError object for a RETURN ERROR ErrorString statement. You can also invoke this constructor directly.

PUBLIC AppError ( INPUT ReturnValue AS CHARACTER )
Note: This constructor does not set an error message. If the AddMessage() method is not used to set one, no message is displayed if an object constructed this way is thrown and handled by default error handling.

Super Class

Progress.Lang.ProError class

Interfaces

This class does not implement interfaces (beyond those it inherits from its base class).

Public Properties

Public Methods

Public Events

This class does not contain events.

Notes

See also

CATCH statement, Progress.Lang.SysError class