What does "Only catch exceptions you can handle" really mean?
Posted
by
KyleLib
on Stack Overflow
See other posts from Stack Overflow
or by KyleLib
Published on 2011-01-12T20:46:27Z
Indexed on
2011/01/12
20:53 UTC
Read the original article
Hit count: 128
c#
|exception-handling
I'm tasked with writing an Exception Handling Strategy and Guidelines document for a .NET/C# project I'm working on. I'm having a tough go at it. There's plenty of information available for how/when to throw, catch, wrap exceptions, but I'm looking for describing what sorts of things should go on inside the catch block short of wrapping and throwing the exception.
try
{
DoSomethingNotNice();
}
catch (ExceptionICanHandle ex)
{
//Looking for examples of what people are doing in catch blocks
//other than throw or wrapping the exception, and throwing.
}
Thanks in advance
© Stack Overflow or respective owner