Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error() returns 0 for a 1526 style error
Message
From
19/10/2005 16:56:37
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Client/server
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01059895
Message ID:
01060510
Views:
19
>Thanks for the reply guys.
>
>I'm trapping the error by doing somthing like :
>
>ON ERROR oError.ErrorHandler(error(),sys(16),lineno())
>
>In the oError.ErrorHandler method I have the following parameters to accept the values from the on error call.
>
>LPARAMETERS tnError, tcMethod, tnLine
>
>tnError is 0
>
>if I replace the error handler and place it in a standard prg, so my on error handler looks like :
>
>ON ERROR errhand(ERROR(),SYS(16),LINENO())
>
>When the error occurs and errhand.prg is run then tnError is still 0.
>
>Weird eh?

Weird indeed. One thing that comes to mind is to try to pass only 2nd and 3rd parameter (i.e. omit the error()/tnError completely) and check for what error() will return in the body of errhand itself.

I haven't had much of these weird experiences, but did have some - and the aError() seems to cover a few things that error() doesn't. Maybe the simplest would be
if tnError=0
   aError(a)
   tnError=a[2]
endif
somewhere early in your error handler.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform