提交 f3d2a9db 编写于 作者: B Ben Laurie

Errors should actually be errors.

上级 8bbf6ac0
...@@ -13,6 +13,8 @@ my $staticloader = ""; ...@@ -13,6 +13,8 @@ my $staticloader = "";
my $pack_errcode; my $pack_errcode;
my $load_errcode; my $load_errcode;
my $errcount;
while (@ARGV) { while (@ARGV) {
my $arg = $ARGV[0]; my $arg = $ARGV[0];
if($arg eq "-conf") { if($arg eq "-conf") {
...@@ -195,6 +197,7 @@ while (($hdr, $lib) = each %libinc) ...@@ -195,6 +197,7 @@ while (($hdr, $lib) = each %libinc)
$rcodes{$name} = $code; $rcodes{$name} = $code;
if ($rassigned{$lib} =~ /:$code:/) { if ($rassigned{$lib} =~ /:$code:/) {
print STDERR "!! ERROR: $lib reason code $code assigned twice\n"; print STDERR "!! ERROR: $lib reason code $code assigned twice\n";
++$errcount;
} }
$rassigned{$lib} .= "$code:"; $rassigned{$lib} .= "$code:";
if(!(exists $rextra{$name}) && if(!(exists $rextra{$name}) &&
...@@ -204,6 +207,7 @@ while (($hdr, $lib) = each %libinc) ...@@ -204,6 +207,7 @@ while (($hdr, $lib) = each %libinc)
} else { } else {
if ($fassigned{$lib} =~ /:$code:/) { if ($fassigned{$lib} =~ /:$code:/) {
print STDERR "!! ERROR: $lib function code $code assigned twice\n"; print STDERR "!! ERROR: $lib function code $code assigned twice\n";
++$errcount;
} }
$fassigned{$lib} .= "$code:"; $fassigned{$lib} .= "$code:";
if($code > $fmax{$lib}) { if($code > $fmax{$lib}) {
...@@ -234,6 +238,7 @@ while (($hdr, $lib) = each %libinc) ...@@ -234,6 +238,7 @@ while (($hdr, $lib) = each %libinc)
if ($rmax{$lib} >= 1000) { if ($rmax{$lib} >= 1000) {
print STDERR "!! ERROR: SSL error codes 1000+ are reserved for alerts.\n"; print STDERR "!! ERROR: SSL error codes 1000+ are reserved for alerts.\n";
print STDERR "!! Any new alerts must be added to $config.\n"; print STDERR "!! Any new alerts must be added to $config.\n";
++$errcount;
print STDERR "\n"; print STDERR "\n";
} }
} }
...@@ -723,3 +728,9 @@ if($debug && defined(@runref) ) { ...@@ -723,3 +728,9 @@ if($debug && defined(@runref) ) {
print STDERR "$_\n"; print STDERR "$_\n";
} }
} }
if($errcount) {
print STDERR "There were errors, failing...\n\n";
exit $errcount;
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册