General information
Category:
Coding, syntax & commands
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
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only