summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2004-11-13 00:41:57 (GMT)
committerdgp <dgp@users.sourceforge.net>2004-11-13 00:41:57 (GMT)
commit3bef8b50f37c4ecdbd789f4a6e7a9fcd2a078ef3 (patch)
treebcbdc1438b205e9c59a551b0a3b9a7cf14ac1851
parent5d132715be3ea1fc57c5b64e85e2de5c3d99fbc0 (diff)
downloadtcl-3bef8b50f37c4ecdbd789f4a6e7a9fcd2a078ef3.zip
tcl-3bef8b50f37c4ecdbd789f4a6e7a9fcd2a078ef3.tar.gz
tcl-3bef8b50f37c4ecdbd789f4a6e7a9fcd2a078ef3.tar.bz2
* library/init.tcl: Made [unknown] robust in the case that
either of the variables ::errorInfo or ::errorCode gets unset. [Bug 1063707]
-rw-r--r--ChangeLog6
-rw-r--r--library/init.tcl10
2 files changed, 15 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 232dcf2..2903d8e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2004-11-12 Don Porter <dgp@users.sourceforge.net>
+
+ * library/init.tcl: Made [unknown] robust in the case that
+ either of the variables ::errorInfo or ::errorCode gets unset.
+ [Bug 1063707]
+
2004-11-12 Jeff Hobbs <jeffh@ActiveState.com>
* generic/tclEncoding.c (TableFromUtfProc): correct crash
diff --git a/library/init.tcl b/library/init.tcl
index b669d6a..0e7cd94 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.55.2.3 2004/05/03 14:28:59 dgp Exp $
+# RCS: @(#) $Id: init.tcl,v 1.55.2.4 2004/11/13 00:41:58 dgp Exp $
#
# Copyright (c) 1991-1993 The Regents of the University of California.
# Copyright (c) 1994-1996 Sun Microsystems, Inc.
@@ -189,6 +189,14 @@ proc unknown args {
# may get modified if caught errors occur below. The variables will
# be restored just before re-executing the missing command.
+ # Safety check in case something unsets the variables
+ # ::errorInfo or ::errorCode. [Bug 1063707]
+ if {![info exists errorCode]} {
+ set errorCode ""
+ }
+ if {![info exists errorInfo]} {
+ set errorInfo ""
+ }
set savedErrorCode $errorCode
set savedErrorInfo $errorInfo
set name [lindex $args 0]