CGI::Carp provides a handy hook for this:
use CGI::Carp qw( fatalsToBrowser set_message );
BEGIN {
sub handle_errors {
my $message = shift;
# Insert some custom code here, for example check the remote address ...
print "<h1>Oh gosh</h1>";
print "<p>Got an error: $message</p>";
}
set_message( \&handle_errors );
}
In reply to Re^2: Failing noticeably in CGI
by WizardOfUz
in thread Failing noticeably in CGI
by rastoboy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |