diff options
author | dgp <dgp@noemail.net> | 2004-11-30 22:19:21 (GMT) |
---|---|---|
committer | dgp <dgp@noemail.net> | 2004-11-30 22:19:21 (GMT) |
commit | 6b405bc9d4e627d384aff8a37e6577b65bb46d5f (patch) | |
tree | 57f851756ce33d8fe7ff272e88f8200c0873aa01 /library | |
parent | 18b8551706461f917ef91405df5f00517773b75a (diff) | |
download | tcl-6b405bc9d4e627d384aff8a37e6577b65bb46d5f.zip tcl-6b405bc9d4e627d384aff8a37e6577b65bb46d5f.tar.gz tcl-6b405bc9d4e627d384aff8a37e6577b65bb46d5f.tar.bz2 |
D'oh! Deal with missing ::errorCode or ::errorInfo.
FossilOrigin-Name: 81f2f82396d8914996302e82d96f70d25a14f4e7
Diffstat (limited to 'library')
-rw-r--r-- | library/init.tcl | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/library/init.tcl b/library/init.tcl index 7cf784b..9fef16f 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.68 2004/11/30 20:30:04 dgp Exp $ +# RCS: @(#) $Id: init.tcl,v 1.69 2004/11/30 22:19:21 dgp Exp $ # # Copyright (c) 1991-1993 The Regents of the University of California. # Copyright (c) 1994-1996 Sun Microsystems, Inc. @@ -179,8 +179,8 @@ proc unknown args { return -options $opts $result } - set savedErrorCode $::errorCode - set savedErrorInfo $::errorInfo + catch {set savedErrorInfo $::errorInfo} + catch {set savedErrorCode $::errorCode} set name [lindex $args 0] if {![info exists auto_noload]} { # @@ -203,8 +203,8 @@ proc unknown args { unset UnknownPending } if {$msg} { - set ::errorCode $savedErrorCode - set ::errorInfo $savedErrorInfo + catch {set ::errorCode $savedErrorCode} + catch {set ::errorInfo $savedErrorInfo} set code [catch {uplevel 1 $args} msg opts] if {$code == 1} { # |