No more Sub::UpLevel, see if this fixes odd sources of warnings and fatals.
This commit is contained in:
parent
7936bad564
commit
a4b1a83df9
1 changed files with 2 additions and 2 deletions
|
|
@ -18,7 +18,6 @@ package WebGUI::Session::Log;
|
||||||
use strict;
|
use strict;
|
||||||
use WebGUI::Paths;
|
use WebGUI::Paths;
|
||||||
use WebGUI::Exception;
|
use WebGUI::Exception;
|
||||||
use Sub::Uplevel;
|
|
||||||
use Scalar::Util qw(weaken blessed);
|
use Scalar::Util qw(weaken blessed);
|
||||||
|
|
||||||
=head1 NAME
|
=head1 NAME
|
||||||
|
|
@ -148,7 +147,8 @@ sub fatal {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
my $message = shift;
|
my $message = shift;
|
||||||
my $error_obj = 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') ) {
|
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
|
# Exception::Class objects have valuable stack traces built in to them; rethrow the existing error to preserve that if possible
|
||||||
$error_obj->rethrow;
|
$error_obj->rethrow;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue