From d9424b6364a6d32e66f47bb8200927bae6300541 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 20 Mar 2009 17:06:50 +0000 Subject: [PATCH] * Show the input bindings in evaluation error messages. --- src/script/hydra_scheduler.pl | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/script/hydra_scheduler.pl b/src/script/hydra_scheduler.pl index cd69dcd0..368ecc55 100755 --- a/src/script/hydra_scheduler.pl +++ b/src/script/hydra_scheduler.pl @@ -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); }