Commit 11a54e6e authored by IKEDA Soji's avatar IKEDA Soji
Browse files

Show more precise logs on error.

parent 4fb71934
...@@ -583,11 +583,11 @@ sub _compile_scenario { ...@@ -583,11 +583,11 @@ sub _compile_scenario {
my $required = join "\n", map { my $required = join "\n", map {
my $req; my $req;
if ($_ eq 'list_object') { if ($_ eq 'list_object') {
$req = 'return undef unless ref $that eq \'Sympa::List\';'; $req = 'die "No list context" unless ref $that eq \'Sympa::List\';';
} elsif ($_ eq 'message') { } elsif ($_ eq 'message') {
$req = sprintf '$context->{message} ||= Sympa::Message->new("\n");'; $req = sprintf '$context->{message} ||= Sympa::Message->new("\n");';
} else { } else {
$req = sprintf 'return undef unless exists $context->{%s};', $_; $req = sprintf 'die "Missing parameter \'%s\'" unless exists $context->{%s};', $_, $_;
} }
" $req"; " $req";
} sort keys %required; } sort keys %required;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment