Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Try/Catch/Finally/Endtry mismatch, error #2058
Message
 
 
À
17/07/2003 19:03:08
Spencer Redfield
Managed Healthcare Northwest, Inc.
Portland, Oregon, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00811323
Message ID:
01019355
Vues:
23
>I encountered a VFP 8 syntax "gotcha" issue that cost me some time. My search in Microsoft's knowledge base and here on the UT did not turn up the issue or solution. I do not pretend to know the technical answer why this issue exists but here it is and the solution.
>
>The following code compiles without error but, at runtime, generates error 2058 on my XP (SP1) machine. The gotcha is the use of the "m." variable alias with the exception object on the CATCH line. Unfortunately I found error 2058's description of little assistance. Solution: Simply remove the "m." and the problem is gone.
>
>
>try
>    ? "Inside TRY"
>catch to m.loException  && Remove the "m." alias and it runs fine
>    ? "Inside CATCH"
>finally
>    ? "Inside FINALLY"
>endtry
>
>
>Perhaps this will save someone else some time.
>
>Spence


I just hit the same error. I wish I can give you stars for saving me!
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform