Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error message from number
Message
From
25/01/2001 19:06:18
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00468523
Message ID:
00468873
Views:
16
In my error method of my form class, I have this:
LPARAMETERS nError, cMethod, nLine
cMsg =  'Error number: ' + STR(ERROR( )) + chr(13)
cMsg = cMsg + 'Error message: ' + MESSAGE( ) + chr(13)
cMsg = cMsg + "The error occurred in : " + cMethod + chr(13)
cMsg = cMsg + "Line #  : " + str(nLine) + chr(13)
thisform.prtmsg(cMsg)
you could assign those globals in here.

Won't help if you are not dealing with a form, I guess. but your could do a little PROC and call it like this
ON ERROR do myErrorProc with ERROR(),MESSAGE()
Where your little proc does whatever you like with those 2 things


>ON ERROR gnErrNum = ERROR() AND gcErrMess = MESSAGE()
>
>Which, of course, doesn't work. I was trying to avoid having to write a seperate method to assign those global variables, so I hoped to be able to just assign gnErrNum and derive the gcErrMess from that.
>
>It wouldn't be so bad if you could put procedures in methods. I just hate adding a method to the form that's only used in one little snippet of code. :)
>
>Thanks,
>
>Michelle
>
Jim Newsom
IT Director, ICG Inc.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform