diff --git a/Changes b/Changes index 12e38e2..65729ef 100644 --- a/Changes +++ b/Changes @@ -1,6 +1,9 @@ Revision history for Mojolicious::Plugin::TtRenderer {{$NEXT}} + - Use die instead of render_exception (GH#29) + +1.22 August 21, 2012 - Compatibility with Mojolicious 3.05+ (GH#24) - Avoid deep recursion when exception template dies (GH#25,GH26) - Fixed test failures (GH#27,GH#28) diff --git a/lib/Mojolicious/Plugin/TtRenderer/Engine.pm b/lib/Mojolicious/Plugin/TtRenderer/Engine.pm index 453840f..bfc2078 100644 --- a/lib/Mojolicious/Plugin/TtRenderer/Engine.pm +++ b/lib/Mojolicious/Plugin/TtRenderer/Engine.pm @@ -87,22 +87,7 @@ sub _render { my $ok = $self->tt->process(defined $inline ? \$inline : $t, @params); # Error - unless ($ok) { - - state $rendering_exception; - - my $e = Mojo::Exception->new($self->tt->error.''); - $$output = ''; - $c->app->log->error(qq/Template error in "$t": $e/); - - unless($rendering_exception) - { - $rendering_exception = 1; - $c->render_exception($e); - $rendering_exception = 0; - $self->tt->error(''); - } - } + die $self->tt->error unless $ok; return 1; }