Changeset 146636 for trunk/base


Ignore:
Timestamp:
Mar 14, 2016, 4:50:26 PM (4 years ago)
Author:
petr@…
Message:

base: add documentation for custom try option

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/src/macports1.0/macports_util.tcl

    r146633 r146636  
    221221}
    222222
    223 # try body ?catch {type_list ?ecvar? ?msgvar? ?infovar?} body ...? ?finally body?
     223# try ?-pass_signal? body ?catch {type_list ?ecvar? ?msgvar? ?infovar?} body ...? ?finally body?
    224224# implementation of try as specified in TIP #89
     225# option -pass_signal passes SIGINT and SIGTERM signals up the stack
    225226proc try {args} {
    226227    # validate and interpret the arguments
     
    228229    if {[llength $args] == 0} {
    229230        return -code error "wrong # args: \
    230             should be \"try body ?catch {type-list ?ecvar? ?msgvar? ?infovar?} body ...? ?finally body?\""
     231            should be \"try ?-pass_signal? body ?catch {type-list ?ecvar? ?msgvar? ?infovar?} body ...? ?finally body?\""
    231232    }
    232233    if {[lindex $args 0] eq "-pass_signal"} {
    233234        lpush catchList {{POSIX SIG SIGINT} eCode eMessage} {
    234             ui_debug [msgcat::mc "Aborted: SIGINT received"]
     235            ui_debug [msgcat::mc "Aborted: SIGINT signal received"]
    235236            throw
    236237        }
    237238        lpush catchList {{POSIX SIG SIGTERM} eCode eMessage} {
    238             ui_debug [msgcat::mc "Aborted: SIGTERM received"]
     239            ui_debug [msgcat::mc "Aborted: SIGTERM signal received"]
    239240            throw
    240241        }
Note: See TracChangeset for help on using the changeset viewer.