summaryrefslogtreecommitdiffstats
path: root/library/init.tcl
diff options
context:
space:
mode:
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]} {