From dc66860d6fc707d9294e7f7be8c887e0df7c2305 Mon Sep 17 00:00:00 2001 From: Len Kranendonk Date: Thu, 3 Nov 2005 15:04:04 +0000 Subject: [PATCH] native mod_perl2 --- lib/WebGUI/ErrorHandler.pm | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/lib/WebGUI/ErrorHandler.pm b/lib/WebGUI/ErrorHandler.pm index f734bd427..694ce2259 100644 --- a/lib/WebGUI/ErrorHandler.pm +++ b/lib/WebGUI/ErrorHandler.pm @@ -19,6 +19,7 @@ use Log::Log4perl; use strict; use WebGUI::Session; use Log::Log4perl; +use Apache2::RequestUtil; $Log::Log4perl::caller_depth++; @@ -171,16 +172,10 @@ Adds a FATAL type message to the log, outputs an error message to the user, and sub fatal { my $message = shift; my $logger = getLogger(); + Apache2::RequestUtil->request->content_type('text/html'); + $logger->fatal($message); $logger->debug("Stack trace for FATAL ".$message."\n".getStackTrace()); - my $cgi; - if (exists $WebGUI::Session::session{cgi}) { - $cgi = $WebGUI::Session::session{cgi}; - } else { - use CGI; - $cgi = CGI->new; - } - print $cgi->header; unless ($WebGUI::Session::session{setting}{showDebug}) { #NOTE: You can't internationalize this because with some types of errors that would cause an infinite loop. print "

Problem With Request