Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: Re (tilly) 3: Seeking Feed backby orkysoft (Friar) |
on Jul 05, 2001 at 16:53 UTC ( [id://94082]=note: print w/replies, xml ) | Need Help?? |
Well, my CGI program was installed in a controlled environment, where errors should be very rare, and users were generally _very_ clueless. I can't just have my program die on them! Instead, my program would skip the file operation in question, but log an error, and display an error message with a possible solution, print out the rest of the page layout, and then end at the same spot the program would normally. Maybe it's a matter of taste, but I just don't like the or die construct, it doesn't give me the ability to neatly and readably handle the exception. Example:
This way, when an error occurs, the user will be informed of the error, and all the links the user would need would still be there.
In Section
Seekers of Perl Wisdom
|
|