Kbase P145066: GetMessage method of AppError object not showing message text
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  22/04/2009 |
|
Status: Unverified
SYMPTOM(s):
GetMessage method of AppError object not showing message text
No messages available when checking NumMessages or GetMessage(n) on a Progress.Lang.AppError object
FACT(s) (Environment):
All Supported Operating Systems
OpenEdge 10.1C
OpenEdge 10.2x
CAUSE:
When creating a new Progress.Lang.AppError object and passing a message to be caught by a handler there are two separate modes this takes on.
#1) If just a string is passed to the constructor, the ABL populates the RETURN-VALUE function and the <error object reference>:ReturnValue property with the message text, which can be retrieved in the calling program. Any error handling code will be able to catch the error but no messages are present.
e.g.
IF <someConditionIsTrue> THEN
UNDO, THROW NEW Progress.Lang.AppError ( "This is my return-value").
#2) If an error number is added as a second parameter to the constructor the ABL sees this as a message to be added to the AppError object.
e.g.
IF <someConditionIsTrue> THEN
UNDO, THROW NEW Progress.Lang.AppError ("This is my error message",1).
FIX:
Pass an integer value to the second parameter of the constructor or access the error using the RETURN-VALUE function or ReturnValue property of the error object handle.