Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Looking for Generic Error Handler for VFP 7
Message
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00872904
Message ID:
00873472
Views:
17
>>>>>>>As per the title, I am looking for a generic error handler for VFP 7.
>>>>>>>
>>>>>>>I have read Doug Hennig's white paper but it seems to require their framework and/or other classes.
>>>>>>>The scenario is that we are would like to add an error handler to an existing application.
>>>>>>>TIA for all suggestions.
>>>>>>
>>>>>>Check the error handler project at http://www.ideaxchg.com/ix07/er/_sys/toccontu.htm.
>>>>>
>>>>>
>>>>>Sergey,
>>>>>
>>>>>Yes, briefly.
>>>>>I noticed that there were about a dozen 'outstanding errhandler tasks' and it threw me off.
>>>>>Are you (or have you) used that one?
>>>>
>>>>Hi Allan,
>>>>
>>>>I still use it, and it serves me well, but I haven't found the time to continue updating the online ErrHandler documentation and download. The programs haven't changed much since the last public update of more than a year ago.
>>>>
>>>>Those outstanding tasks are fairly obscure details, most of which are self-explanatory. Some have long since been fixed, others have not risen to a level of sufficient importance to bother with. In any case, the source code and demo are freely available, if you want to take a look.
>>>>
>>>>It is difficult to do justice to a presentation of this subject, so I've contented myself simply to use the programs and refine them as necessary, for my own purposes. I do hope that you and others find it interesting and instructive. Once you understand the approach, I'm sure you can figure out ways of extending it to suit your own needs.
>>>>
>>>>Mike
>>>
>>>Mike,
>>>Is there some sort of 'jump start' document available for those that want to use it but not necessarily understand it thoroughly?
>>>TIA.
>>
>>Allan,
>>
>>Run the demo for a concrete example. Type any sort of invalid command line and see how it behaves. Explore the options, or it will get boring very fast.
>>
>>Review the programs, starting with the main one. There are plenty of comments, and the class properties are fully annotated.
>>
>>You can adapt an existing app, or even a home-grown framework to work with the ErrHandler approach. One of its nice features is that it doesn't require all of your objects to be based on it, only selected ones. For example, the demo form is based on the ErrHForm foundation class, but none of the controls on the form have any particular constraint upon their parentage.
>>
>>Ultimately, it's hard to imagine using this sort of facility without having a pretty thorough understanding of it. As I see it, you don't just "add an error handler". There's an ErrHandler way of doing things, which is what the demo illustrates.
>>
>>I could go on at length, but please don't tempt me, because it will be a distraction from a much more interesting ErrHandler-based application. ;)
>>
>>Mike
>
>Mike,
>
>One more question please...
>Will it 'catch' errors in the data environment?
>Specifically, trying to open free tables?
>The reason I am asking is because of the firing of events.
>TIA.

Allan,

ErrHandler should be able to handle any sort of VFP-trappable errors, i.e. those that would trigger either an Error event or an ON ERROR handler. However, my personal preference has been to steer clear of the data environment, because I've found it to be clumsy and inflexible, e.g. in the way that absolute paths become hard-wired. It's possible that some of the more recent DE enhancements subsequent to VFP6 have alleviated those problems, but I haven't revisited this issue.

Mike
Montage

"Free at last..."
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform