summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2004-09-20 15:52:03 (GMT)
committerdgp <dgp@users.sourceforge.net>2004-09-20 15:52:03 (GMT)
commitfa23bf52f589e9e06c1fe10ef19f5667f1cddf9e (patch)
tree5e3dba6a5c20ffe6d2dddd953c7f77b72ae44411
parent0128966eb26542c2e43adc50bb9324bd4479bd46 (diff)
downloadtcl-fa23bf52f589e9e06c1fe10ef19f5667f1cddf9e.zip
tcl-fa23bf52f589e9e06c1fe10ef19f5667f1cddf9e.tar.gz
tcl-fa23bf52f589e9e06c1fe10ef19f5667f1cddf9e.tar.bz2
* tests/error.test (error-6.2,3): Added more tests to verify
::errorCode setting by/after a [catch].
-rw-r--r--ChangeLog5
-rw-r--r--tests/error.test11
2 files changed, 15 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index ea74861..8028307 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-09-20 Don Porter <dgp@users.sourceforge.net>
+
+ * tests/error.test (error-6.2,3): Added more tests to verify
+ ::errorCode setting by/after a [catch].
+
2004-09-19 Miguel Sofer <msofer@users.sf.net>
* 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 ""}