Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error Trapping OFF
Message
De
06/08/1999 02:09:44
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
À
04/08/1999 19:27:12
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00249344
Message ID:
00250546
Vues:
28
>>? on("error")
>>
>>will give you the current error handler setting. You may even save it into a variable,
>
>and throughout the 'run form' exercise, it returns a null string, showing that I've successfully switched error handling off
>
>nevertheless, instead of crashing on the offending line (I can step through the guilty line and watch this happen), despite having defused the error handler, the code leaps to the error method for the form where I've inserted a nodefault in the attempt to stall it. It then protests 'no parameter statement found' and crashes in the normal way - i.e. at the offending line! Trouble is the offending line is now the first line of the error method and not the code line that caused the jump in the first place.

Check the "error event" in help - it says it has
PROCEDURE Object.Error
LPARAMETERS [nIndex,] nError, cMethod, nLine

So, no matter what you write in it, it gets passed three or four parameters. The optional parameter is received for a member of a control array (like a button in a group). You better include these parameters and simply suspend. Maybe the best thing to do is to leave the error method completely empty, you should get the default behavior of the elder class. Though, if you've built your form on FFC, you will get the error method of the FFC _Form class; in that case, you may try

LPARAMETERS nError, cMethod, nLine
form::error(nError, cMethod, nLine)
nodefault

in your form's error event code. This should give you the behavior of the base class.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform