From: Jacob Bachmeyer Date: Sat, 5 Nov 2022 21:28:00 +0000 (-0500) Subject: Use structured exception to report an unsigned directive X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=32c0f4d6fb21b8b2aa03fd02b224bf8c962383fb;p=gatekeeper.git Use structured exception to report an unsigned directive --- diff --git a/gatekeeper.pl b/gatekeeper.pl index 5f54ca2..c8d59cb 100755 --- a/gatekeeper.pl +++ b/gatekeeper.pl @@ -2630,12 +2630,14 @@ foreach my $packet (@packets) { # each list element is an array reference eval { # trap exceptions encountered while processing a packet local $Phase = 'PV'; $directive_text = slurp_clearsigned_message($packet->[0]); - $directive = read_directive_from_string($directive_text); # This would imply that the directive file did not contain a signed # message. There is nothing further to do. - fatal("directive file $directive_file has no signature",0) - if $directive_text eq ''; + throw directive_syntax => trace => [], + summary => "directive file $packet->[0] has no signature" + if $directive_text eq ''; + + $directive = read_directive_from_string($directive_text); # this function just updates $info{email} guess_email_address_from_signature($directive_text);