Error handling
- Last Updated: January 17, 2024
- 1 minute read
- OpenEdge
- Version 12.8
- Documentation
ABL traps all COM object errors caused by property and method
references. ABL formats the error information into an ABL error message
that includes the hexadecimal code of the COM object error and explanatory
text. If you specify the NO-ERROR option on a statement
that references a COM object property or method, ABL stores the error
information in the ERROR-STATUS handle, as shown:
|
Note: Some types of ABL statements treat any errors
as warnings even if the method or property reference results in
a serious error. For warnings, ABL does not set the
ERROR-STATUS:ERROR attribute.
Thus, to detect that any exception (warning or error) occurred,
you must check ERROR-STATUS:NUM-MESSAGES for a
value greater than zero, as in the example.You cannot otherwise access COM object error information directly unless a method includes this information in its return value or in an output parameter. This means you cannot reliably respond to a particular COM object error code. You can only tell that an error occurred and search the message text for a set of likely error codes.