From fa23bf52f589e9e06c1fe10ef19f5667f1cddf9e Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 20 Sep 2004 15:52:03 +0000 Subject: * tests/error.test (error-6.2,3): Added more tests to verify ::errorCode setting by/after a [catch]. --- ChangeLog | 5 +++++ tests/error.test | 11 ++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index ea74861..8028307 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-09-20 Don Porter + + * tests/error.test (error-6.2,3): Added more tests to verify + ::errorCode setting by/after a [catch]. + 2004-09-19 Miguel Sofer * generic/tclCmdAH.c: removed outdated comment [Bug 1029518]. diff --git a/tests/error.test b/tests/error.test index 1581f4c..3773df5 100644 --- a/tests/error.test +++ b/tests/error.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: error.test,v 1.10 2003/05/05 20:54:52 dgp Exp $ +# RCS: @(#) $Id: error.test,v 1.11 2004/09/20 15:52:05 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -176,6 +176,15 @@ test error-6.1 {catch must reset error state} { catch {error outer [catch {error inner inner.errorInfo inner.errorCode}]} list $errorCode $errorInfo } {NONE 1} +test error-6.2 {catch must reset error state} { + catch {error outer [catch {return -level 0 -code error -errorcode BUG}]} + list $errorCode $errorInfo +} {NONE 1} +test error-6.3 {catch must reset error state} { + set errorCode BUG + catch {error outer [catch set]} + list $errorCode $errorInfo +} {NONE 1} # cleanup catch {rename p ""} -- cgit v0.12