Consultor Eletrônico



Kbase P79219: It is not possible to customize PROMSGS
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   10/10/2006
Status: Verified

GOAL:

Is it possible to customize progress error messages?

GOAL:

Is it possible to customize PROMSGS?

FIX:

Modifying PROMSGS file is not recommended and not supported but you can write your own error handling mechanism by using the NO-ERROR option and by checking the ERROR-STATUS handle afterwards. A sample could be: DEF VAR errornumber AS INT.
FIND FIRST customer WHERE custnum = 676767 NO-ERROR.
IF ERROR-STATUS:ERROR THEN DO:
errornumber = error-status:GET-NUMBER(1).
RUN myerrorhandler.p (INPUT errornumber).
END. /* myerrorhandler.p */
DEFINE INPUT PARAMETER errornumber AS INT.
IF errornumber = 565 THEN MESSAGE "Record not found".
/* Further IF/CASE statements depending on error raised */