use die instead of render_exception

This commit is contained in:
Graham Ollis
2012-08-23 15:26:38 -04:00
parent b21db5cf22
commit 870d195761
2 changed files with 4 additions and 16 deletions

View File

@@ -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)

View File

@@ -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;
}