abort messages with http error code
[sheet.git] / sc.plp
diff --git a/sc.plp b/sc.plp
index 3437f8f4aca51ce2da337d4f36f10682a47a93ab..a282ef4007ebc9e4f74afcd35e9e7fe76f154e91 100644 (file)
--- a/sc.plp
+++ b/sc.plp
@@ -43,9 +43,9 @@ Html({
 say "<h1>$scver{game} units</h1>\n";
 
 my $units = do $datafile;
-die "Cannot open unit data: $_\n" for $@ || $! || ();
+Abort("Cannot open unit data", 501, $_) for $@ || $! || ();
 my $patch = shift @{$units}
-       or die "Cannot open unit data: metadata not found\n";
+       or Abort("Cannot open unit data: metadata not found", 501);
 
 say "<p>Unit properties as seen or measured in $scver{name}\n$patch.";
 say "Also see the $_ table." for join(', ',