Skip to content

Commit

Permalink
No more Sub::UpLevel, see if this fixes odd sources of warnings and f…
Browse files Browse the repository at this point in the history
…atals.
  • Loading branch information
perlDreamer committed Dec 5, 2011
1 parent 7936bad commit a4b1a83
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/WebGUI/Session/Log.pm
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit a4b1a83

Please sign in to comment.