Ignore:
Timestamp:
Mar 24, 2016, 7:45:25 AM (9 years ago)
Author:
ldelgass
Message:

Fix error reporting if puq get_params fails (debug file might be missing)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lang/tcl/scripts/task.tcl

    r6191 r6208  
    668668    set pid [pid]
    669669    # puts "puq.sh get_params $pid $varlist $uq_type $uq_args"
    670     if {[catch {exec puq.sh get_params $pid $varlist $uq_type $uq_args}]} {
    671         set fp [open "uq_debug.err" r]
    672         set rdata [read $fp]
    673         close $fp
    674         puts "get_params.py failed: $rdata"
    675         error "get_params.py: $rdata"
     670    if { [catch {
     671        exec puq.sh get_params $pid $varlist $uq_type $uq_args
     672    } errs] != 0 } {
     673        set contents {}
     674        if { [file exists "uq_debug.err"] } {
     675            set fp [open "uq_debug.err" r]
     676            set contents [read $fp]
     677            close $fp
     678        }
     679        puts "get_params.py failed: $errs\n$contents"
     680        error "get_params.py failed: $errs\n$contents"
    676681    }
    677682    return params[pid].csv
Note: See TracChangeset for help on using the changeset viewer.