Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Errorhandling
Message
De
08/01/2015 10:09:26
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Errorhandling
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 8.1
Network:
SAMBA Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01613303
Message ID:
01613303
Vues:
97
Hi all,

I have a problem wit TRY CATCH errorhandling
Example
lomu = NEWOBJECT('mu')

add_p(_SCREEN)

lomu.add_x


DEFINE CLASS mu AS CONTAINER
 PROCEDURE ERROR
  LPARAMETERS;
   tnError,;
   tcMethod,;
   tnLine,;
   tvReturn

  ?'Error event'
 ENDPROC &&mu.error

 PROCEDURE add_x
  add_p(THIS)
 ENDPROC &&mu.add_x
ENDDEFINE &&mu as session


PROCEDURE add_p
 LPARAMETERS lomu
 TRY
   ?lomu.NAME
   lomu.ADDOBJECT('mux','xxr')

   ?'not catchedd'

  CATCH TO loException
   ?'catchedd'
  FINALLY
*
 ENDTRY
ENDPROC &&addp
As you can see the call for the object will not be catched by TRY CATCH

if there is no ERROR event then it is catched

Any idea how catch the error? This is a example for my factory and it fails to catch the problems ...

Thanks

Lutz
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform