It had not crossed my mind for a need to pass back control. This seems like a logical thing to do. Your help is, as always, much appreciated.
Sent by FoxWeb Support on 01/31/2013 12:33:24 AM:
If all you want is to temporarily suspend the default error handler, then all you need to do is the following:
M.OldErrorHandler = ON(ERROR) && Save the error handler to a variable
ON ERROR DO ... && Set your own error handling code
INSERT INTO ... && Your code that needs special error handling
ON ERROR (M.OldErrorHandler) && Revert back to the native error handler
If you actually would like to pass control to the FoxWeb error handler from your own error handler depending on the error or other conditions, then it's a bit more complicated, but achievable. Let me know if this is the case.
FoxWeb Support Team
Sent by Joe Goldsmiith on 01/30/2013 03:58:28 PM:
Thanks much for your consideration. Perhaps of small value let me explain how this one example may happen.
A tech builds a laser product and before packaging it is manually given a unique serial number used as the unique key. The serial number is composed of up to 16 alphanumeric encoded digits based on a scheme where each positional set is unique to the date, time, tech, etc. When the serial number is entered into the certification table, along with test results, the serial number can be easily transposed where it breaks the SQL insert. Should this happen all of FoxWeb crashes hard causing a manual stop/restart.
I hope this might be helpful.
Sent by FoxWeb Support on 01/30/2013 01:50:37 PM:
Joe, I will need to research this one a bit. I expect to post a response by the end of the week.
FoxWeb Support Team
Sent by Joe Goldsmiith on 01/29/2013 10:08:47 PM:
There are times when I would like to use On Error to more smoothly handle an error. For one example, under some circumstances, such as with a unique key violation, all of FoxWeb crashes causing a manual stop and restart.
If I were to use my own On Error to handle an error how do I pass On Error control back to FoxWeb?