Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How does on error work ?

Status
Not open for further replies.

INFORMAT

Programmer
Jan 3, 2001
121
BE
Hello,

I have a form where I put an error and the 'on error' command shows a modal form. When the program reached the error line he shows me the error form but still continue the program.

When I put an second error in the program the 'on error' command shows a model form with only the last error.

Is it possible when an error occured, the program shows an error form and the program leaves the method where the error occurred when clicking OK.

Thanks four your time and answer.

Informat CV
 
Check out the ON ERROR in the MSDN, you can use the RETRY, IGNORE or SET STEP ON to debug.

It is also possible to use the Error method of your class, to catch the error.

There was a freely avaliable article from FoxTalk in the MSDN on line library. Haven't got the link right now though...sorry.

HTH,

Weedz (Wietze Veld)
veld4663@exact.nl

They cling emotionally to code and fix development rather than choosing practices based on analytical assesments of what works best.

After the GoldRush - Steve McConnell
 
Hi Informat,

Yes, you can control what program execution returns to in the call stack. Refer to the RETURN command in the VFP docs utilizing the TO ProcedureName clause.

Also read:
INFO: Understanding the RETURN Command
FIX: RETURN TO Procedurename Command Doesn’t Work in Forms

The 2nd article doesnt apply to VFP6, but is FYI. Also remember, when you redirect execution up the call stack, you are also not allowing the bypassed method/program to perform any clean up operations such as closing a table it had opened, releasing any object references it had created, etc... Jon Hawkins

The World Is Headed For Mutiny,
When All We Want Is Unity. - Creed
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top