summaryrefslogtreecommitdiffstats
path: root/library/init.tcl
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2009-01-13 20:30:03 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2009-01-13 20:30:03 (GMT)
commit2982ceeb51c99eb042c8477125d3d1da80b84387 (patch)
tree01ade12b49117b7dbe4027f9ddff331b91731046 /library/init.tcl
parent91fcbdbc1ce2836f8df968af33ce13bff991a90b (diff)
downloadtcl-2982ceeb51c99eb042c8477125d3d1da80b84387.zip
tcl-2982ceeb51c99eb042c8477125d3d1da80b84387.tar.gz
tcl-2982ceeb51c99eb042c8477125d3d1da80b84387.tar.bz2
Move [throw] implementation into C.
Diffstat (limited to 'library/init.tcl')
-rw-r--r--library/init.tcl23
1 files changed, 5 insertions, 18 deletions
diff --git a/library/init.tcl b/library/init.tcl
index 2d8e303..74fd5f4 100644
--- a/library/init.tcl
+++ b/library/init.tcl
@@ -3,7 +3,7 @@
# Default system startup file for Tcl-based applications. Defines
# "unknown" procedure and auto-load facilities.
#
-# RCS: @(#) $Id: init.tcl,v 1.118 2008/12/19 03:54:44 dgp Exp $
+# RCS: @(#) $Id: init.tcl,v 1.119 2009/01/13 20:30:04 dkf Exp $
#
# Copyright (c) 1991-1993 The Regents of the University of California.
# Copyright (c) 1994-1996 Sun Microsystems, Inc.
@@ -113,8 +113,8 @@ namespace eval tcl {
}
}
-# TIP #329: [try] and [throw]
-# These are *temporary* implementations, to be replaced with ones in C and
+# TIP #329: [try]
+# This is a *temporary* implementation, to be replaced with one in C and
# bytecode at a later date before 8.6.0
namespace eval ::tcl::control {
# These are not local, since this allows us to [uplevel] a [catch] rather
@@ -125,20 +125,7 @@ namespace eval ::tcl::control {
variable magicCodes { ok 0 error 1 return 2 break 3 continue 4 }
- namespace export throw try
-
- # ::tcl::control::throw --
- #
- # Creates an error with machine-readable "code" parts and
- # human-readable "message" parts.
- #
- # Arguments:
- # throw - list describing errorcode
- # message - Human-readable version of error
- proc throw {type message} {
- return -code error -errorcode $type -errorinfo $message -level 1 \
- $message
- }
+ namespace export try
# ::tcl::control::try --
#
@@ -306,7 +293,7 @@ namespace eval ::tcl::control {
return -options $_opts $_em
}
}
-namespace import ::tcl::control::*
+namespace import ::tcl::control::try
# Windows specific end of initialization