summaryrefslogtreecommitdiffstats
path: root/library/init.tcl
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2009-12-30 13:47:52 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2009-12-30 13:47:52 (GMT)
commit7c7c6aa17bf0f27a8d5890a53d75e74830212d02 (patch)
tree20bae48cbf87d3b4b303e4948cedafe99ff44019 /library/init.tcl
parent443f16f9ffd4df41748337a63571c02f7081ff14 (diff)
downloadtcl-7c7c6aa17bf0f27a8d5890a53d75e74830212d02.zip
tcl-7c7c6aa17bf0f27a8d5890a53d75e74830212d02.tar.gz
tcl-7c7c6aa17bf0f27a8d5890a53d75e74830212d02.tar.bz2
* library/init.tcl (unknown): fix infinite recursion of ::unknown
when [set] is undefined [Bug 2824981].
Diffstat (limited to 'library/init.tcl')
-rw-r--r--library/init.tcl11
1 files changed, 8 insertions, 3 deletions
diff --git a/library/init.tcl b/library/init.tcl
index 6ca4873..a62f3a0 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.121 2009/03/09 09:12:39 dkf Exp $
+# RCS: @(#) $Id: init.tcl,v 1.122 2009/12/30 13:47:53 msofer Exp $
#
# Copyright (c) 1991-1993 The Regents of the University of California.
# Copyright (c) 1994-1996 Sun Microsystems, Inc.
@@ -237,8 +237,13 @@ proc unknown args {
variable ::tcl::UnknownPending
global auto_noexec auto_noload env tcl_interactive
- catch {set savedErrorInfo $::errorInfo}
- catch {set savedErrorCode $::errorCode}
+
+ if {[info exists ::errorInfo]} {
+ set savedErrorInfo $::errorInfo
+ }
+ if {[info exists ::errorCode]} {
+ set savedErrorCode $::errorCode
+ }
set name [lindex $args 0]
if {![info exists auto_noload]} {