Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Try/Catch Routine Not Working
Message
 
À
09/02/2005 19:56:24
Nancy Folsom
Pixel Dust Industries
Washington, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00985235
Message ID:
00985394
Vues:
43
Nancy,
LOL Yeah I knew that it was unreachable (that is why I added the "quite correctly" statement) <s>
I was simply trying to show that it is possible (i.e. it compiles) to use a return in a try...catch, but I have to emphasise that I do not recommend doing that <s>. (I only like to see _one_ return per method (unless the method returns void and then I don't want to see any returns).

I just hope you are not picking on the Packers <s>

Einar

>>This method compiles just fine, except there are squiggly lines under the return in the try stating, quite correctly, "unreachable code detected".
>
>That's because it's, well, unreachable. The
throw new Exception("Go Pack Go");
immediately stops the code executing. But, you knew this, right?
Semper ubi sub ubi.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform