Skip to content

Commit

Permalink
use CORE::die consistently
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Feb 26, 2016
1 parent aa8f6cf commit 0405c04
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/Mojo/Template.pm
Expand Up @@ -101,8 +101,8 @@ sub interpret {

# Stack trace
local $SIG{__DIE__} = sub {
CORE::die($_[0]) if ref $_[0];
die Mojo::Exception->new(shift)
CORE::die $_[0] if ref $_[0];
CORE::die Mojo::Exception->new(shift)
->trace->inspect($self->unparsed, $self->code)->verbose(1);
};

Expand Down
2 changes: 1 addition & 1 deletion lib/Mojolicious.pm
Expand Up @@ -186,7 +186,7 @@ sub startup { }
sub _exception {
my ($next, $c) = @_;
local $SIG{__DIE__}
= sub { ref $_[0] ? CORE::die($_[0]) : Mojo::Exception->throw(@_) };
= sub { ref $_[0] ? CORE::die $_[0] : Mojo::Exception->throw(@_) };
$c->helpers->reply->exception($@) unless eval { $next->(); 1 };
}

Expand Down

0 comments on commit 0405c04

Please sign in to comment.