It is discouraged to simply catch System.Exception
. Instead, only the "known" exceptions should be caught.
Now, this sometimes leads to unnecce
What is in the link doesn't answer your question directly, but it's trivial to extend it to look like:
static void Main()
{
Action body = () => { ...your code... };
body.Catch()
.Catch()
.Catch(ex => { ...handler... })();
}
(Basically provide another empty Catch
overload which returns itself)
The bigger question to this is why. I do not think the cost outweighs the gain here :)