forked from lix-project/hydra
* Show the input bindings in evaluation error messages.
This commit is contained in:
parent
3d26bb7fd1
commit
d9424b6364
|
@ -411,7 +411,18 @@ sub checkJobset {
|
|||
# Store the errors messages for jobs that failed to evaluate.
|
||||
my $msg = "";
|
||||
foreach my $error (@{$jobs->{error}}) {
|
||||
$msg .= "at `" . $error->{location} . "': " . $error->{msg} . "\n\n";
|
||||
my $bindings = "";
|
||||
foreach my $arg (@{$error->{arg}}) {
|
||||
my $input = $inputInfo->{$arg->{name}}->[$arg->{altnr}] or die "invalid input";
|
||||
$bindings .= ", " if $bindings ne "";
|
||||
$bindings .= $arg->{name} . " = ";
|
||||
given ($input->{type}) {
|
||||
when ("string") { $bindings .= "\"" . $input->{value} . "\""; }
|
||||
when ("boolean") { $bindings .= $input->{value}; }
|
||||
default { $bindings .= "..."; }
|
||||
}
|
||||
}
|
||||
$msg .= "at `" . $error->{location} . "' [$bindings]:\n" . $error->{msg} . "\n\n";
|
||||
}
|
||||
setJobsetError($jobset, $msg);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue