Try OpenEdge Now
skip to main content
ABL Reference
Handle Attributes and Methods Reference : ERROR attribute
 

ERROR attribute

A compile-time or run-time error condition.
Data type: LOGICAL
Access: Readable/Writeable
Applies to: Asynchronous request object handle, Buffer object handle, COMPILER system handle, ERROR-STATUS system handle, ProDataSet object handle, Temp-table object handle
The ERROR attribute corresponds to the ERROR function.
For the asynchronous request object handle, the ERROR attribute indicates that the ERROR condition was encountered during the processing of an AppServer or Web Server request. If the COMPLETE attribute is FALSE, the value of this attribute is the Unknown value (?). This attribute is set immediately before the event procedure is executed.
For the COMPILER system handle, the ERROR attribute indicates whether an error occurred in the preceding compilation. If no error occurred in the preceding compilation, the value of ERROR is the Unknown value (?).
For the ProDataSet object handle, Temp-table object handle, and Buffer object handle, the ERROR attribute indicates whether an error occurred during a FILL or SAVE-ROW-CHANGES operation.
For a ProDataSet object handle or a temp-table object handle, the ERROR attribute is reset to FALSE when one of the following methods removes the object's before-image records:
*FILL( ) method
*EMPTY-DATASET( ) method
*MERGE-CHANGES( ) method
*ACCEPT-CHANGES( ) method
*REJECT-CHANGES( ) method
The ERROR attribute is effective only if a before-table is NO-UNDO during a data source update. If the before-table is UNDO, the ERROR attribute is lost.
For the Buffer object handle, this attribute causes the row to be backed out rather than merged with the MERGE-CHANGES( ) method or the MERGE-ROW-CHANGES( ) method.
This attribute is marshalled between the client and the AppServer.
For the ERROR-STATUS system handle, the ERROR attribute indicates whether the ABL ERROR condition was raised in the most recent statement that used the NO-ERROR option. If no ERROR condition was raised in that statement, the value of the ERROR attribute is FALSE.
The ERROR attribute is writeable for a ProDataSet object, a Temp-table object, and a Buffer object. You can set the ERROR attribute programmatically in order to manage the application response to errors. For example, you might set the ERROR attribute to FALSE in order to ignore all errors that might be returned for a statement using the NO-ERROR option. However, note that manually setting this attribute has no affect on ABL error management. Thus, if you set the ERROR attribute to TRUE, the AVM does not also raise the ERROR condition.
Note: Statements such as COMPILE that handle errors as part of their normal function do not raise the ABL ERROR condition. For example, the COMPILE statement does not raise the ERROR condition when it encounters compilation errors in a procedure.