@@ -123,8 +123,8 @@ proc run-job {job} {
}
}
-proc catching-otherwise {failst script} {
- # Executes $script.
+proc catching-otherwise {failst script args} {
+ # Executes $script $args.
# If job is already a failure (ie not $ok), skips it (ie does nothing).
# If any Tcl exception is thrown, declares the job a failure.
# (ie sets job status to $failst, and sets ok to 0)
@@ -134,9 +134,9 @@ proc catching-otherwise {failst script} {
if {!$ok} return
if {[catch {
- uplevel 1 $script
+ uplevel 1 $script $args
} emsg]} {
- jobdb::logputs stderr "$flight.$jobinfo(job) $script failed: $emsg"
+ jobdb::logputs stderr "$flight.$jobinfo(job) $script $args failed: $emsg"
set ok 0
setstatus $failst
}
Allow catching-otherwise to take a variable number of tail arguments, that will be propagated to the called proc. Signed-off-by: Roger Pau Monné <roger.pua@citrix.com> --- Changes since v3: - New in this version. --- sg-run-job | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)