Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Stopping a function from my error handler...
Message
From
19/10/2000 15:30:24
 
 
To
19/10/2000 14:40:01
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00431640
Message ID:
00431748
Views:
20
>Great!
>
>But how can I know the name of the procedures that are available to go back to? For example, if I get an error in the click event of a button that's on a certain form. If I'm now in my error handler and I want to go back to looking at my form (forgetting to execute all the code after the error in my click event), how can I do this?
>
In click event:

local lFileOpenSuccessful
lFileOpenSuccessful = .t.
On error do FileOpenErrorHandler with error(), lFileOpenSuccessful
use TableXYZ in 0
on error do YourRegularErrorHandler with ...
if lFileOpenSuccessful
    * do all your stuff here
endif

elsewhere:
FUNCTION FileOpenErrorHandler
lparameters nError, lFileOpenSuccessful

*Some code here
IF nError = 13 THEN &&Table not opened
    *Code that sends a message and then stops the execution
    *of the calling method
    lfileOpenSuccessful = .f.
ENDIF
ENDFUNC
HTH,
Steve Gibson
Previous
Reply
Map
View

Click here to load this message in the networking platform