OpenEdge.Messaging.MessagingError is the
messaging error class used when an exception is thrown from the ABL code of the
messaging framework. Errors thrown from this class are typically validation errors, such
as when an incorrect server is specified. Progress.Lang.MessagingError is the error class used when an error occurs
in the underlying message producer.
This figure shows the hierarchy of the messaging error classes:
With either type of exception, you can use the normal properties and methods
available to retrieve the error information:
CallStack property
NumMessages property
Severity property
GetMessage(MessageIndex) method
GetMessageNum (MessageIndex) method
This example code shows how to handle an error when sending a record from a
producer is unsuccessful:
...
if response:Success then do:
message "Send successful" view-as alert-box.
end.
else do:
undo, throw new Progress.Lang.AppError("Failed to send the record: " +
response:ErrorMessage, 0).
end.
catch err as Progress.Lang.Error :
message err:GetMessage(1) view-as alert-box.
end catch.