Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
On Error
Message
From
30/06/2003 13:04:44
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00805374
Message ID:
00805377
Views:
14
>Hi Everybody,
>
>When the program enters a routine, I want to save the default procedure or whatever for the:
ON ERROR
Then, when it returns from the routine, I would like to set
ON ERROR
to its default value before entering that routine.
>Notice: the default is a procedure(which I don't know the name), which is not the VFP default error handler.
>
>Thank You,
>Ali

Ali,
&& save on error
local sError
sError = on('error')

&& your stuff
Private HadError
HadError = .f.
on error HadError = .t.

&& do something
do
case
case HadError
   && something went wrong

endcase

&& reset to original value
on error &sError
Gregory
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform