http://www.ckwop.me.uk/Why-Exceptions-Suck.html

The guy writes some good info here; but the question remains: how should a good developer implement the code to ensure exceptions are properly handled?

I think we have to change our mind from thinking “in error codes” to “thinking in exceptions”. That means: at every operation, instead of thinking of checking the error code, thinking of catching the possible exceptions. The resulted code will be more complicated, but, after writing a sequence of code, we can refactor it and consolidate the catch statements.

Also see http://msdn.microsoft.com/en-us/library/5b2yeyab.aspx.

http://blogs.msdn.com/b/brada/archive/2003/09/30/50403.aspx

Advertisements