Welcome to the Monastery | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
CGI::Carp's fatalsToBrowsers catches die. So it won't catch things that don't die nor things that die before it gets control (I think newer versions also catch warn and perhaps some other things, check the The second case is the easiest to categorize. If you have the statement use CGI::Carp 'fatalsToBrowser'; in your script, then CGI::Carp gets control as soon as that statement is done compiling. So compile-time errors in that statement or prior to it will not be caught. For example, #!/usr/bin/perl -wT might cause a "too late for -T" error that would not be caught. Not having CGI::Carp properly installed could also cause problems. There are a few ways to cause a server error without dieing so that they won't be caught. The following are some likely examples. Whether they actually cause a server error in spite of fatalsToBrowser may depend on the version of CGI::Carp you are using and on your web server configuration:
What can go wrong before Perl gets control depends on your web server configuration. You could have a bad #! line (including having \r\n on the end when just \n was expected). (updated) - tyeIn reply to Re: When Does FatalsToBrowser Not Send Fatals To Browser? (not die)
by tye
|
|