Compare commits

...

2 Commits

Author SHA1 Message Date
Graham Ollis
7455ae1be8 v1.23 2012-08-23 15:27:07 -04:00
Graham Ollis
870d195761 use die instead of render_exception 2012-08-23 15:26:38 -04:00
3 changed files with 4 additions and 17 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

@@ -39,7 +39,6 @@ version_regexp = ^release/(.*)
[HasVersionTests]
[MetaTests]
[ReadmeFromPod]
[PodCoverageTests]
[Manifest]
[NextRelease]

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