From 6ebafffea6c91519f001e4373966169d29a906f2 Mon Sep 17 00:00:00 2001 From: Jacob Bachmeyer Date: Wed, 2 Nov 2022 21:24:48 -0500 Subject: [PATCH] Send the summary for a structured exception to syslog --- gatekeeper.pl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gatekeeper.pl b/gatekeeper.pl index d4d3f46..0064a2c 100755 --- a/gatekeeper.pl +++ b/gatekeeper.pl @@ -568,8 +568,11 @@ All types include a brief summary given with the C 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; } @@ -1856,7 +1859,6 @@ sub interpret_directive { } if (@errors) { - ftp_syslog('err', $errors[0]); throw directive_syntax => trace => \@trace, summary => $errors[0]; } -- 2.25.1