Exceptions allow your code to flow, and have this clear section that explains that you know what you are doing and are taking steps to handle the slings and arrows of outrageous fortune.
Or put better. Errors are a direct result of the bitter reality of stupid hardware, stupid users, stupid other things not in my direct control. (my) Code is (always) perfect (Heh) but must deal with Imperfect other pieces.
Speaking in perl:
eval {
#something that can break
}
if ($!) {
print STDERR "Ohgod, the twit user hit the eject button!";
deploy_chute();
shoot_user();
}
|