use die instead of render_exception
This commit is contained in:
3
Changes
3
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)
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user