Permalink
Browse files

No more Sub::UpLevel, see if this fixes odd sources of warnings and f…

…atals.
  • Loading branch information...
perlDreamer committed Dec 5, 2011
1 parent 7936bad commit a4b1a83df9fd85401a00e1d0a3b3ec247a041bef
Showing with 2 additions and 2 deletions.
  1. +2 −2 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;

0 comments on commit a4b1a83

Please sign in to comment.