Hi John,
As far as i read your question and the conversation that followed, This is
what I understand from your observations:
1. In a server VFP program an error is encountered
2. The error handling kicks in, as it should issuing a CLEAR EVENTS
3. you're expecting it to go straight through to the line after the READ
EVENTS in your main program.....
but: it still executes some lines of code you didn't expect it to. Right?

Then my question to you: What command is used to exit the error-handling?
If it's handling from an ON ERROR routine, there are some possible
scenario's
If you're using a RETURN or even no command at all (as I'm expecting you're
using), the line that triggered the error is ignored and the program
continues to run UNTIL it finaly hits the wait-state. Then it notices that
the wait state was cleared and continues onto the following lines. RETRY
reissues the last line, so you're again in the errorhandling giving you an
endless loop. CANCEL cancels the complete program, so that's probably not
what you want for to quit gracefully. IMO you want a RETURN TO MASTER. This
doesn't return to the executing procedure/program/method but goes straight
back to the READ EVENTS.
So the last lines in your error handling should be:
CLEAR EVENTS && Clear the wait state
RETURN TO MASTER && Return to the main program READ EVENTS.

Regards,
Sietse Wijnker




> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of John Weller
> Sent: vrijdag 5 januari 2007 23:29
> To: [EMAIL PROTECTED]
> Subject: RE: FW: Error Handling
> 
> I know exactly where and why it is bombing - there is a 
> syntax error in an SQL command.  The problem is that the SQL 
> error has shown me that my error handling routine is not 
> behaving as I expected.  My query is - where am I going wrong 
> with the error handler?  As I explained in my reply to Ted, 
> in this case it is a fault on my part but it could be an 
> error caused by the backup app using the tables when my app 
> needs to open them or move a file.
> So that the error won't lock up the system I need it to exit 
> gracefully ready to try again 5 minutes later when, 
> hopefully, the backup routine will have moved on.
> 
> John Weller
> 01380 723235
> 07976 393631
> 
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] Behalf Of john harvey
> > Sent: 05 January 2007 22:20
> > To: [EMAIL PROTECTED]
> > Subject: RE: FW: Error Handling
> >
> >
> > Is it bombing at a the same place each time? If so, try-catch is a 
> > good solution.
> >
> > John
> >
> > -----Original Message-----
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On 
> > Behalf Of John Weller
> > Sent: Friday, January 05, 2007 4:15 PM
> > To: [email protected]
> > Subject: RE: FW: Error Handling
> >
> > The process hasn't finished but has hit an error - 
> typically unable to 
> > open a table as another app, probably a backup routine, has grabbed 
> > it.
> > Basically I need ON ERROR QUIT but I really want something slightly 
> > less dramatic that will log an error and close gracefully.  
> I expected 
> > that the CLEAR EVENTS command would return me to the READ 
> EVENTS which 
> > has all the good stuff like on shutdown immediately after it.
> >
> > John Weller
> > 01380 723235
> > 07976 393631
> >
> > > -----Original Message-----
> > > From: [EMAIL PROTECTED]
> > > [mailto:[EMAIL PROTECTED] Behalf Of john harvey
> > > Sent: 05 January 2007 21:58
> > > To: [EMAIL PROTECTED]
> > > Subject: RE: FW: Error Handling
> > >
> > >
> > > If the process has finished, why not just do an - on 
> shutdown, clea 
> > > all, close all, quit?
> > >
> > >
> > >
> >
> >
> >
[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to