From a4b1a83df9fd85401a00e1d0a3b3ec247a041bef Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Mon, 5 Dec 2011 10:43:41 -0800 Subject: [PATCH] No more Sub::UpLevel, see if this fixes odd sources of warnings and fatals. --- lib/WebGUI/Session/Log.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/WebGUI/Session/Log.pm b/lib/WebGUI/Session/Log.pm index e20e568e1..468fb6a45 100644 --- a/lib/WebGUI/Session/Log.pm +++ b/lib/WebGUI/Session/Log.pm @@ -18,7 +18,6 @@ package WebGUI::Session::Log; use strict; use WebGUI::Paths; use WebGUI::Exception; -use Sub::Uplevel; use Scalar::Util qw(weaken blessed); =head1 NAME @@ -148,7 +147,8 @@ sub fatal { my $self = shift; my $message = shift; my $error_obj = shift; - Sub::Uplevel::uplevel( 1, $self->getLogger, { level => 'fatal', message => $message}); + local $Log::Log4perl::caller_depth = $Log::Log4perl::caller_depth + 1; + $self->getLogger->( { level => 'fatal', message => $message} ); if( blessed $error_obj and $error_obj->can('rethrow') ) { # Exception::Class objects have valuable stack traces built in to them; rethrow the existing error to preserve that if possible $error_obj->rethrow;