Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
No Overload takes 5 arguments
Message
 
À
19/09/2013 09:20:51
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
C# 4.0
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01583574
Message ID:
01583689
Vues:
46
>I haven't read this, but is has over 300 reviews and 3.9 stars. http://www.codeproject.com/Articles/9538/Exception-Handling-Best-Practices-in-NET

Do you know what is the purpose of this code? (taken from the link above)
try
{
    // Some code that throws an exception
}
catch (Exception ex)
{
    // some code that handles the exception
    throw;
}
I saw it in many places, but I never understood why would you catch an exception just to throw it again, would't it that the behaviour if you did not have the try in the first place?
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform