Add backtrace printing option through SetEnv KOHA_BACKTRACES 1

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
MJ Ray 2008-04-01 19:29:18 +01:00 committed by Joshua Ferraro
parent 20241fd686
commit 697088968a
1 changed files with 5 additions and 0 deletions

View File

@ -64,6 +64,11 @@ BEGIN {
print "</body></html>";
}
CGI::Carp::set_message(\&handle_errors);
## give a stack backtrace if KOHA_BACKTRACES is set
## can't rely on DebugLevel for this, as we're not yet connected
if ($ENV{KOHA_BACKTRACES}) {
$main::SIG{__DIE__} = \&CGI::Carp::confess;
}
} # else there is no browser to send fatals to!
$VERSION = '3.00.00.036';
}