Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do I disable the foxpro error handler?
Message
From
01/12/2004 14:01:27
 
 
To
30/11/2004 18:57:39
William Metzener
Russell Mellon Analytical Services
Tacoma, Washington, United States
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP1
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00965916
Message ID:
00966155
Views:
11
William-

PMFJI, I'd urge you to not resort to ON ERROR *, which is brutish and can mask legitimate errors with devastating results. If you can't resolve the error itself using Sergey's FAQ, then I would suggest trapping the error in the combo's error method. So, for example,
* Combo.Error()
Procedure Error
Lparameters nError, cMethod, nLine
If nError = 1152 && "Cannot access the selected table ".
  * We are just eating this error for now because it doesn't seem to be doing any harm.
  * However, we still need to find the cause!
Else
  if version(2)=2
    Assert .F. Message Message() && Give programmer a chance to debug any errors
  else
    Local lni
    lni = Messagebox(Message(),2+16+512,"Error in date field")
    Do Case
    Case lni = 3 && Abort
      Cancel
    Case lni = 4 && Retry
      Retry
    Case lni = 5 && Ignore
      Return
    Endcase
  Endif
Endif
Endproc
BTW, a neat little trick: if you do break the program, set the next program statement to the RETY line and step. You'll then have a chance to see what code was generating the error. Unless the problem is coming because of a property setting, as Sergey's FAQ mentions.

Good luck with finding the solution. I, too, almost always work on inherited code, and it has its own special challenges.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform