New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Changeset 81236


Ignore:
Timestamp:
07/27/11 17:50:08 (4 years ago)
Author:
jmr@…
Message:

mpab: better error handling in subports.tcl

File:
1 edited

Legend:

Unmodified
Added
Removed
  • contrib/mpab/subports.tcl

    r81233 r81236  
    4141if {[catch {mportinit "" "" ""} result]} { 
    4242   ui_error "$errorInfo" 
    43    fatal "Failed to initialize ports sytem: $result" 
     43   ui_error "Failed to initialize ports sytem: $result" 
     44   exit 1 
    4445} 
    4546 
    4647if {[llength $::argv] == 0} { 
    47     fatal "Usage: $argv0 <portname>" 
     48    puts stderr "Usage: $argv0 <portname>" 
     49    exit 1 
    4850} 
    4951 
    5052set portname [lindex $::argv 0] 
    5153 
    52 if {[catch {set one_result [mportlookup $portname]}]} { 
    53     fatal "lookup failed for port: $portname" 
     54if {[catch {set one_result [mportlookup $portname]}] || [llength $one_result] < 2} { 
     55    # just pass it through, MPAB will complain about it later 
     56    puts $portname 
     57    exit 0 
    5458} 
    5559puts [lindex $one_result 0] 
Note: See TracChangeset for help on using the changeset viewer.