[Progress Communities] [Progress OpenEdge ABL] Forum Post: RE: PASOE still makes mysterious distinction between RETURN ERROR CH-Error versus UNDO THRO

Status
Not open for further replies.
L

Laura Stern

Guest
Sorry, but you are looking at things from a very skewed perspective. No - an AppError is not the EQUIVALENT of RETURN ERROR. It merely provides backward compatibility with that statement. An AppError can have much more information in it. Also, in the past some applications used the string of RETURN ERROR to be an error message. But some used it for other purposes. Now with AppError, you can have a real error message, and use ReturnValue for something else, like context information, if you wish. Plus you can have your own error class that inherits from AppError and put whatever you want in there. So no - most developers of a new application would not simply use the ReturnValue. They will set an error message into the object, which is the most important thing, and then possibly use ReturnValue or other custom properties. That way when the error is caught, they do not need to distinguish between an AppError or a SysError to display the error message. They can always use GetMessage(n) to get the error message string out. Then if it is an AppError, they may want to do additional processing.

Continue reading...
 
Status
Not open for further replies.
Top