By paul_houle
via gen5.info
Published: Aug 05 2008 / 11:22
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.
Comments
StephenCronin replied ago:
Site seems to be down, for me at least. Shame as I really wanted to read this...
StephenCronin replied ago:
It's back now. Must just have been down for a few hours.
paul_houle replied ago:
That article got on the front page of reddit, and that killed my $30 VPS with too little RAM. Ordering a dedi later today.
Voters For This Link (40)
Voters Against This Link (10)