There's more than one way to do things | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Fellow Monasterians: I know that the Perlish way to handle an errors, like writing to a file, is to die, print the error $!, and take the forced exit. However, because I am writing commercial end-user web apps, I can't just exit—I need to put the best face on the error and keep the program going. In review, this is what I was taught:
However, this is basically what I have been doing instead:
Is it "safe" or "good practice" not to die? Or is there some intrinsic value of die that I am missing by not using it? Thanks all! —Brad "The important work of moving the world forward does not wait to be done by perfect men." George Eliot In reply to Friendly error trapping by bradcathey
|
|