提交 f6be8315 编写于 作者: R Richard Levitte

util/dofile.pl: report if a template couldn't be loaded

Reviewed-by: NRich Salz <rsalz@openssl.org>
上级 5a008ff6
......@@ -159,7 +159,11 @@ my @autowarntext = ("WARNING: do not edit!",
my $prev_linecount = 0;
my $text =
@ARGV
? join("", map { my $x = "{- output_reset_on() -}".Text::Template::_load_text($_);
? join("", map { my $x = Text::Template::_load_text($_);
if (!defined($x)) {
die $Text::Template::ERROR, "\n";
}
$x = "{- output_reset_on() -}" . $x;
my $linecount = $x =~ tr/\n//;
$prev_linecount = ($linecount += $prev_linecount);
$lines{$linecount} = $_;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册