Information générale
Catégorie:
Codage, syntaxe et commandes
I would get the Program(), lineno() and probably try and get the call stack as well. This is will provide you with pretty much all the information you need.
Typically this is what I return.
"Error " + ALLTRIM(STR(ERROR())) + CHR(13)+ ;
"Message() " + ALLTRIM(MESSAGE()) + CHR(13) + ;
"Message(1) " + ALLTRIM(MESSAGE(1)) + CHR(13) + ;
"SYS(2018) " + ALLTRIM(SYS(2018)) + CHR(13) + ;
"Program " + ALLTRIM(UPPER(p_PROGRAM)) + CHR(13) + ;
"Line Number " + ALLTRIM(STR(p_LINENO)) + CHR(13)
And get the callstack by this;
FUNCTION callstack
PARAMETERS p_prog
PRIVATE w_prog, w_return, w_sub, w_cnt
w_return = ""
FOR w_sub = 2 TO 32
IF program(w_sub)==p_prog
EXIT
ENDIF
NEXT
FOR w_cnt = w_sub TO 2 STEP -1
IF w_return==""
w_return=PROGRAM(w_cnt)
ELSE
w_return = w_return + "," + PROGRAM(w_cnt)
ENDIF
NEXT
RETURN w_return
Hope this helps.
Jon
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement