Status | ||||
---|---|---|---|---|
|
Problem
If I use the TRY...CATCH statement I can get the error code using the SQLCA or STATUS variables but these do not return more detail such as function where the error occurred, lines where it occurred. How can I get this information?
Solution
Pass the STRING parameter which will contain range of lines where error may occur to the fn_handle_exception() function, and handle it inside.
Info |
---|
Error lines in native Lycia error messages are available only in debug(unl) cache. |
There are two options to retrieve a full error message:
Code Block |
---|
MAIN
DEFINE err INTEGER
CALL startlog("xxxx.log")
TRY
OPEN WINDOW w1 WITH FORM "yyyy"
CATCH
CALL fgl_getkey()
END TRY
END MAIN |
or
Code Block |
---|
MAIN
DEFINE err INTEGER
CALL startlog("xxxx.log")
WHENEVER ANY ERROR CALL errorlog
OPEN WINDOW w1 WITH FORM "yyyy"
CALL fgl_getkey()
END MAIN |
To get the error text, use ERR_GET( )
Find more details on how to implement error logging in Lycia Online Tutorials
Related articles
Filter by label (Content by label) | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|