summaryrefslogtreecommitdiffstats
path: root/tests/error.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/error.test')
-rw-r--r--tests/error.test26
1 files changed, 25 insertions, 1 deletions
diff --git a/tests/error.test b/tests/error.test
index 1d5f9a0..737faa4 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.9 2002/01/29 03:03:02 hobbs Exp $
+# RCS: @(#) $Id: error.test,v 1.9.2.1 2004/10/26 20:14:36 dgp Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -176,6 +176,30 @@ 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.3 {catch must reset error state} {
+ set errorCode BUG
+ catch {error outer [catch set]}
+ list $errorCode $errorInfo
+} {NONE 1}
+test error-6.4 {catch must reset error state} {
+ catch {error [catch {error foo bar baz}] 1}
+ list $errorCode $errorInfo
+} {NONE 1}
+test error-6.7 {catch must reset error state} {
+ proc foo {} {
+ return -code error -errorinfo [catch {error foo bar baz}]
+ }
+ catch foo
+ list $errorCode
+} {NONE}
+test error-6.9 {catch must reset error state} {
+ proc foo {} {
+ return -code error [catch {error foo bar baz}]
+ }
+ catch foo
+ list $errorCode
+} {NONE}
+
# cleanup
catch {rename p ""}