Fixed double TT rendering on error
If a template produced a rendering error in process() but did not produce one when called without stash variables, the Mojo::Exception would be built incorrectly, leading to an exception that masked the original error.
This commit is contained in:
@@ -85,9 +85,7 @@ sub _render {
|
||||
# Error
|
||||
unless ($ok) {
|
||||
|
||||
my $e = Mojo::Exception->new(
|
||||
$self->tt->error.'',
|
||||
$self->tt->service->process(defined $inline ? \$inline : $t));
|
||||
my $e = Mojo::Exception->new($self->tt->error.'');
|
||||
$$output = '';
|
||||
$c->app->log->error(qq/Template error in "$t": $e/);
|
||||
$c->render_exception($e);
|
||||
|
||||
Reference in New Issue
Block a user