Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
No Overload takes 5 arguments
Message
 
To
19/09/2013 09:20:51
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
C# 4.0
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01583574
Message ID:
01583689
Views:
47
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform