Try OpenEdge Now
skip to main content
Error Handling
Using ABL Error Classes : Progress.Lang.Error interface : Throwing class-based error objects from an AppServer to an ABL client
 

Throwing class-based error objects from an AppServer to an ABL client

Error objects can be thrown from an AppServer to an ABL client if their classes implement the Progress.Lang.Error interface and they satisfy additional conditions, given below. Error objects passed from AppServer to client are serialized on the sending side and then deserialized on the receiving side. The following restrictions apply to error objects thrown from an AppServer to a client:
*In the case of a user-defined class, the object’s class and all of the classes in its hierarchy must be marked as SERIALIZABLE. For more information on marking a class as SERIALIZABLE, see the CLASS statement entry in OpenEdge Development: ABL Reference .
*The content of static data members is not serialized, and the state of queries, buffers, open files, streams, and event subscriptions, for example, are not maintained.
*All of the object's data members that are defined as class-based objects must be of a class type that is also marked SERIALIZABLE. (This restriction does not apply to static data members that are defined as objects, because static data members are not serialized.)
*Handle-based variables are serialized, but no information for reconstructing handle-based objects on the receiving side is serialized.
*MEMPTRs assigned by an ABL application are serialized, but MEMPTRs from an external source (such as a DLL or shared library) are not serialized.
*Statically defined temp-tables and ProDataSets in user-defined classes are serialized, except for REFERENCE-ONLY tables.
*The REJECTED, ERROR, ERROR-STRING, and DATA-SOURCE-MODIFIED attributes for temp-tables in an object are maintained as part of the deserialization process. Similarly, the REJECTED and ERROR attributes for ProDataSets are maintained during serialization.
*Not all built-in classes are serializable. See the CLASS statement entry in OpenEdge Development: ABL Reference for a full list of serializable built-in classes.
*.NET and ABL-extended .NET error objects cannot be thrown.