In a CGI if you do:
die "Bugger!\n";
then the user will not get an error message. Typically they will get a 500 internal server error or a blank screen, depending on if a header has been output. They will not see the error message. A die nice routine might be:
# sack the QA team! sub die_nice { my ( $real_error ) = @_; email( $ADMIN, $real error ); warn $real_error; # this will log it like die # Make sure we have a valid header.... print "Content-Type: text/html\n\n"; # Lie to the user, we don't want to let them know our code is unst +able now do we? print " <p>Sorry the server is unable to respond to your request due to routin +e maintenance <p>Please try again later...."; # yeah right..... exit 1; }
So rather than die-ing you die nice ie do some stuff you want. You could just set a DIE handler but.....
cheers
tachyon
In reply to Re: What is dienice???
by tachyon
in thread What is dienice???
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |