Hi Donald,
<i><font color="#663300">I'm not sure if the error trapping was supposed to work out of the box or not...</font></i>
I don't remember exactly because I have made some serious modifications to the i-layer error classes to suit myself, but my recollection is that it is very close to perfect out of the box. Several of us (including Ed) tested it quite thoroughly.
<i><font color="#663300">Am I missing something?</font></i>
From the examles you cited, I can't be certain as to which methods you are specifically referring (the ErrorHandler or the Baseform.Error or the individual control Error() method). However, the original code was pulled directly from the source code that accompanied the error handling articles written by Doug Hennig and published in the Jan and Feb 1998 issues of Foxtalk. They should be available as a white paper (with the code) from www.stonefield.com/pub/errorh.zip. As you can see from the demo, this code does run right out of the box. There were a couple of problems with the original code which are described and solved in the August 2000 issue of Foxtalk which I believe you would have to get directly from www.pinpub.com.
<i><font color="#663300">It seems to me that the only solution is to remove all error event code at the C-Level and create a generic ON ERROR routine.</font></i>
I would strongly advise against this course of action. Doug Hennig's error handling work is acknowledged throughout the entire VFP community as "the model" and it would be well worth whatever minor effort it would take to make it work. I can't tell you how many hours it has saved me in debugging (even with the existing bug <bg>) and with the print option added to the user interface (from the update article), it is going to save many more. :-) Pamela pamela (AT) eagle-crest D.OT com ©2001 Pamela Thalacker |