diff options
| author | fukachan <fukachan> | 2002-01-20 13:50:22 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2002-01-20 13:50:22 +0000 |
| commit | 21eb333a9efe70817dc00a8b10fbf3070612c062 (patch) | |
| tree | d5b424cee9c4f0a21f3457d206fc6ccc29cab67e /fml/lib | |
| parent | e8e4e70704f89e4faeb7df60a9fd55c6b111b673 (diff) | |
| download | fml8-21eb333a9efe70817dc00a8b10fbf3070612c062.tar.gz fml8-21eb333a9efe70817dc00a8b10fbf3070612c062.tar.bz2 fml8-21eb333a9efe70817dc00a8b10fbf3070612c062.zip | |
fixed to call up error to FML::Process::Command layer
Diffstat (limited to 'fml/lib')
| -rw-r--r-- | fml/lib/FML/Command.pm | 5 | ||||
| -rw-r--r-- | fml/lib/FML/Command/SendFile.pm | 15 |
2 files changed, 17 insertions, 3 deletions
diff --git a/fml/lib/FML/Command.pm b/fml/lib/FML/Command.pm index 8d8b0222..d56d370a 100644 --- a/fml/lib/FML/Command.pm +++ b/fml/lib/FML/Command.pm @@ -4,7 +4,7 @@ # All rights reserved. This program is free software; you can # redistribute it and/or modify it under the same terms as Perl itself. # -# $FML: Command.pm,v 1.14 2001/11/27 11:22:09 fukachan Exp $ +# $FML: Command.pm,v 1.15 2001/12/22 09:21:01 fukachan Exp $ # package FML::Command; @@ -106,7 +106,8 @@ sub AUTOLOAD } else { LogError("$pkg module is not found"); - LogError($@); + LogError($@) if $@; + croak("$pkg module is not found"); # upcall to FML::Process::Command } } diff --git a/fml/lib/FML/Command/SendFile.pm b/fml/lib/FML/Command/SendFile.pm index 0ba266a7..9d3e47cd 100644 --- a/fml/lib/FML/Command/SendFile.pm +++ b/fml/lib/FML/Command/SendFile.pm @@ -4,7 +4,7 @@ # All rights reserved. This program is free software; you can # redistribute it and/or modify it under the same terms as Perl itself. # -# $FML: SendFile.pm,v 1.5 2001/12/22 09:21:03 fukachan Exp $ +# $FML: SendFile.pm,v 1.6 2001/12/23 09:20:42 fukachan Exp $ # package FML::Command::SendFile; @@ -57,11 +57,13 @@ sub send_article my $ml_name = $config->{ ml_name }; my $spool_dir = $config->{ spool_dir }; my $charset = $config->{ template_file_charset }; + my $is_error = 0; # command buffer = get 1 # command buffer = get 1,2,3 # command buffer = get last:3 my (@files) = split(/\s+/, $command); + shift @files; # remove get for my $fn (@files) { my $filelist = $self->_is_valid_argument($curproc, $fn); if (defined $filelist) { @@ -81,6 +83,17 @@ sub send_article } } } + # invalid argument + else { + Log("send_article: invalid target: $fn"); + $is_error = 1; + } + } + + if ($is_error) { + $curproc->reply_message_nl('command.get.invalid.args', + "invalid argument"); + croak("send_article() fails"); } } |
