>>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?
I think the catch comment is probably badly worded. If the exception could truly be handled then re-throwing would be unnecessary. If it's only partially handled (eg logging or notifying the user) but is not recoverable then throwing to a higher level makes sense....