Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error handling dilema
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00037106
Message ID:
00037261
Views:
29
>>I have an error handler at the form level and all objects on the form pass errors they can`t handle up to the form to process. The form level error handler displays a form with pertinent information.
>>
>>This is all well an good for production, but in design mode I prefer the way VFP traps errors and gives me the option to suspend which automatically opens the debugger on the line of code that caused the error.
>>
>>Is there any way that I can simulate this behavior after my form has trapped the error? I.e. have a debug button on my error display form that when clicked will open the debugger on the line that caused the error
>>
>>RETRY doesn't work. What I really want is to be positioned on the offending line of code, not re-execute it.
>
>Bret,
>
>I haven't tried this so if it doesn't work don't launch any missles at me ;-) (I hope I'm not the umpteenth person to make a joke about where you work. If so, sorry)
>
>At the beginning of your error handler insert:
>
>IF VERSION(2) # 0
> ON ERROR
> RETRY
>ENDIF
>
>What should happen in development is that the error handler is turned off, which restores the default FoxPro error handler, the line is re-executed and VFP handler tripped. This should bring up the VFP dialog and get you where you want to be. Under runtime conditions, of course, your handler should work exactly as you intend.
>
>HTH,
>
>George

Probably it would be better:

IF VERSION(2) # 0
SET STEP ON
ENDIF

Vlad
Previous
Reply
Map
View

Click here to load this message in the networking platform