package Local::Exception::directive_syntax;
{our @ISA = qw(Local::Exception)}
+ sub directory { (shift)->{directory} }
+
sub trace { (shift)->{trace} }
sub trace_msg
if (@errors) {
throw directive_syntax =>
- trace => \@trace, summary => $errors[0];
+ trace => \@trace, summary => $errors[0], directory => $header{directory};
}
return \@ops;
# Check that we actually have at least one command in the directive
unless ($#$ops > 0) {
if (1 == scalar @$packet) {
- throw directive_syntax => trace => [],
+ throw directive_syntax =>
+ trace => [], directory => $op_header->{directory},
summary => 'nothing to do - no commands in directive file';
} else {
# Provide a different message if this looks like an upload packet.
- throw directive_syntax => trace => [],
+ throw directive_syntax =>
+ trace => [], directory => $op_header->{directory},
summary => "no filename element in $stem.directive.asc."
.' Upgrade to the latest version! '
.'See http://www.gnu.org/prep/maintain/maintain.html';
# This would imply that the directive file did not contain a signed
# message. There is nothing further to do.
- throw directive_syntax => trace => [],
+ throw directive_syntax => trace => [], directory => undef,
summary => "directive file $packet->[0] has no signature"
if $directive_text eq '';