Skip to content

Commit a4b1a83

Browse files
committedDec 5, 2011
No more Sub::UpLevel, see if this fixes odd sources of warnings and fatals.
1 parent 7936bad commit a4b1a83

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎lib/WebGUI/Session/Log.pm

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ package WebGUI::Session::Log;
1818
use strict;
1919
use WebGUI::Paths;
2020
use WebGUI::Exception;
21-
use Sub::Uplevel;
2221
use Scalar::Util qw(weaken blessed);
2322

2423
=head1 NAME
@@ -148,7 +147,8 @@ sub fatal {
148147
my $self = shift;
149148
my $message = shift;
150149
my $error_obj = shift;
151-
Sub::Uplevel::uplevel( 1, $self->getLogger, { level => 'fatal', message => $message});
150+
local $Log::Log4perl::caller_depth = $Log::Log4perl::caller_depth + 1;
151+
$self->getLogger->( { level => 'fatal', message => $message} );
152152
if( blessed $error_obj and $error_obj->can('rethrow') ) {
153153
# Exception::Class objects have valuable stack traces built in to them; rethrow the existing error to preserve that if possible
154154
$error_obj->rethrow;

0 commit comments

Comments
 (0)
Please sign in to comment.