Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do I disable the foxpro error handler?
Message
De
01/12/2004 14:01:27
Nancy Folsom
Pixel Dust Industries
Washington, États-Unis
 
 
À
30/11/2004 18:57:39
William Metzener
Russell Mellon Analytical Services
Tacoma, Washington, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP1
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
00965916
Message ID:
00966155
Vues:
10
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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform