Error!
Success!

Stop Catching Exceptions!

0
kicks

Stop Catching Exceptions!  (Unpublished)

Too many programmers catch exceptions too often, causing both mainline and error handling logic to be complex and error-prone. Although C#, PHP and other languages don't make the mistake that Java made with Checked Exceptions, Java trained a generation of programmers in bad habits. A strategy that (i) uses finally as the first resort for containing corrupting and maintaining invariants, (ii) uses catch locally when the exceptions thrown in an area are completely understood, and (iii) surrounds independent units of work with try-catch blocks is an effective basis for using exceptions that can be built upon to develop an exception handling policy for a particular application.


Kicked By:
Drop Kicked By: