Send the summary for a structured exception to syslog
authorJacob Bachmeyer <jcb@gnu.org>
Thu, 3 Nov 2022 02:24:48 +0000 (21:24 -0500)
committerJacob Bachmeyer <jcb@gnu.org>
Thu, 3 Nov 2022 02:24:48 +0000 (21:24 -0500)
gatekeeper.pl

index d4d3f46e2b95ef0b27816377dcd1e85d4b01339e..0064a2cbe4827a476ed10521ad4641d4948275ba 100755 (executable)
@@ -568,8 +568,11 @@ All types include a brief summary given with the C<summary> option.
 
 sub throw {
   my $type = shift;
+  my $ob = {type => $type, @_};
 
-  die bless {type => $type, @_}, 'Local::Exception::'.$type;
+  ftp_syslog('err', $ob->{summary}) if $ob->{summary};
+
+  die bless $ob, 'Local::Exception::'.$type;
 }
 
 \f
@@ -1856,7 +1859,6 @@ sub interpret_directive {
   }
 
   if (@errors) {
-    ftp_syslog('err', $errors[0]);
     throw directive_syntax =>
       trace => \@trace, summary => $errors[0];
   }