Unverified Commit 3def2b43 authored by boklm's avatar boklm
Browse files

Exit with error in case of template error

parent 3960c6cb
......@@ -122,20 +122,24 @@ sub make_reports_index {
reports_list => \@reports_by_time,
reports_by_type => \%reports_by_type,
};
$template->process('reports_index.html', $vars, 'index.html');
$template->process('reports_index.html', $vars, 'index.html')
|| exit_error "Template Error:\n" . $template->error;
$template->process('tests_index.html', { %$vars, tests =>
\@TBBTestSuite::Tests::tests }, 'tests.html');
\@TBBTestSuite::Tests::tests }, 'tests.html')
|| exit_error "Template Error:\n" . $template->error;
foreach my $tbbver (keys %reports_by_tbbversion) {
my @s = sort { $reports{$b}->{time} <=> $reports{$a}->{time} }
@{$reports_by_tbbversion{$tbbver}};
$template->process('reports_index_browserbundle.html',
{ %$vars, reports_list => \@s }, "tbbversion_$tbbver.html");
{ %$vars, reports_list => \@s }, "tbbversion_$tbbver.html")
|| exit_error "Template Error:\n" . $template->error;
}
foreach my $type (keys %reports_by_type) {
my @s = sort { $reports{$b}->{time} <=> $reports{$a}->{time} }
@{$reports_by_type{$type}};
$template->process("reports_index_$type.html",
{ %$vars, reports_list => \@s }, "index-$type.html");
{ %$vars, reports_list => \@s }, "index-$type.html")
|| exit_error "Template Error:\n" . $template->error;
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment