[146636] trunk/base/src/macports1.0/macports_util.tcl

petr at macports.org petr at macports.org
Mon Mar 14 09:50:27 PDT 2016


Revision: 146636
          https://trac.macports.org/changeset/146636
Author:   petr at macports.org
Date:     2016-03-14 09:50:26 -0700 (Mon, 14 Mar 2016)
Log Message:
-----------
base: add documentation for custom try option

Modified Paths:
--------------
    trunk/base/src/macports1.0/macports_util.tcl

Modified: trunk/base/src/macports1.0/macports_util.tcl
===================================================================
--- trunk/base/src/macports1.0/macports_util.tcl	2016-03-14 16:45:23 UTC (rev 146635)
+++ trunk/base/src/macports1.0/macports_util.tcl	2016-03-14 16:50:26 UTC (rev 146636)
@@ -220,22 +220,23 @@
     }
 }
 
-# try body ?catch {type_list ?ecvar? ?msgvar? ?infovar?} body ...? ?finally body?
+# try ?-pass_signal? body ?catch {type_list ?ecvar? ?msgvar? ?infovar?} body ...? ?finally body?
 # implementation of try as specified in TIP #89
+# option -pass_signal passes SIGINT and SIGTERM signals up the stack
 proc try {args} {
     # validate and interpret the arguments
     set catchList {}
     if {[llength $args] == 0} {
         return -code error "wrong # args: \
-            should be \"try body ?catch {type-list ?ecvar? ?msgvar? ?infovar?} body ...? ?finally body?\""
+            should be \"try ?-pass_signal? body ?catch {type-list ?ecvar? ?msgvar? ?infovar?} body ...? ?finally body?\""
     }
     if {[lindex $args 0] eq "-pass_signal"} {
         lpush catchList {{POSIX SIG SIGINT} eCode eMessage} {
-            ui_debug [msgcat::mc "Aborted: SIGINT received"]
+            ui_debug [msgcat::mc "Aborted: SIGINT signal received"]
             throw
         }
         lpush catchList {{POSIX SIG SIGTERM} eCode eMessage} {
-            ui_debug [msgcat::mc "Aborted: SIGTERM received"]
+            ui_debug [msgcat::mc "Aborted: SIGTERM signal received"]
             throw
         }
         lshift args
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160314/3eca6235/attachment.html>


More information about the macports-changes mailing list