Hi,
I am building some error trapping/handling into my app. I'm already using the following code in the startup program of my app to give me basic information about the error:
*****************
ON ERROR DO errhand WITH ;
ERROR( ), MESSAGE( ), MESSAGE(1), PROGRAM( ), LINENO( )
PROCEDURE errhand
PARAMETER merror, mess, mess1, mprog, mlineno
CLEAR
oCUWS.Apperror = "PROGRAM ERROR DETAILS"+chr(13)+chr(10)
oCUWS.Apperror = oCUWS.Apperror + chr(13)+chr(10)
oCUWS.Apperror = oCUWS.Apperror + 'Error number: ' + LTRIM(STR(merror))+chr(13)+chr(10)
oCUWS.Apperror = oCUWS.Apperror + 'Error message: ' + mess +chr(13)+chr(10)
oCUWS.Apperror = oCUWS.Apperror + 'Line of code with error: ' + mess1 +chr(13)+chr(10)
oCUWS.Apperror = oCUWS.Apperror + 'Line number of error: ' + LTRIM(STR(mlineno)) +chr(13)+chr(10)
oCUWS.Apperror = oCUWS.Apperror + 'Program with error: ' + mprog
DO FORM pERROR
*****************
Tha above part works fine. What I'd also like to retrieve are all the open tables/cursors and all the memory variables and current application object properties when the error happens. Any ideas?
Al Williams
Anola MB, CANADA