Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Trapping an Error
Message
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00362580
Message ID:
00362719
Views:
17
John,

>Are you from Misery?

Yup, I grew up in DeSoto until I went to college in Rolla.

>BTW, do you utilize Doug Hennig's framework for error handling in your framework?

No, I don't. All of my lowest level baseclasses delegate an error to a UDF ObjError( this, nError, cMethod, nLine ) At devtime it prompts to enter the debug environment and at runtime it logs the error and shuts down. For the very few cases where a runtime error is allowed to occur the object that can cause the error overrides the Error() method and either handles it itself or directly delegates it to thisform. I strongly believe in defensive coding and test for probable error conditions before they occur.

In John's case I'd conditionally enable the item that allows them to start the form. If the file doesn't exist leave the item disabled. I think this approach is easier to maintain than putting lots of error trap code.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform