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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VFP Error 2

Status
Not open for further replies.

mantry

MIS
Oct 22, 2001
9
0
0
US
I have an app developed in VFP7.
In a prg I have a procedure which will accept three parameters. When a call is made to this procedure with more than 3 parameters, I get a VFP error "Must specify additional parameters" which makes sense. But I would like to trap this message and return the message as an XMLString

Question: Is it possible for me trap this message and populate it. If yes, can you let me know how.

Thanks,
Mantry
 
Mantry,

In addition to what Barbara told you (and, by the way, the download she mentioned is very useful; it helped me out of a difficult situation once) ...

Basically, the way to trap an error in VFP is to use ON ERROR. That command will let you set up an error handler. An error handler is an ordinary VFP routine which has access to details of the error (error number, message, etc.).

You can do (almost) anything you like in an error handler, including creating an XML file containing the error details.

Sorry if I am telling you stuff you already know.

Mike


Mike Lewis
Edinburgh, Scotland
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top