summaryrefslogtreecommitdiffstats
path: root/tests/trace.test
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2004-11-03 17:16:03 (GMT)
committerdgp <dgp@users.sourceforge.net>2004-11-03 17:16:03 (GMT)
commitf6daa6116e683fc15534f46a414da180d25bf7fa (patch)
tree522f2260bb6a7f37ff62d01a10eeafec32d324aa /tests/trace.test
parente82130fc14b54af2b6d23fd1ef721761b3eb2ed0 (diff)
downloadtcl-f6daa6116e683fc15534f46a414da180d25bf7fa.zip
tcl-f6daa6116e683fc15534f46a414da180d25bf7fa.tar.gz
tcl-f6daa6116e683fc15534f46a414da180d25bf7fa.tar.bz2
* generic/tclTrace.c (TclCallVarTraces): Improved ability to debug
* tests/incr-old.test (incr-old-2.6): errors during variable * tests/incr.test (incr-{1,2}.28): traces by preserving the * tests/set.test (set-{2,4}.4): -errorinfo data. * tests/trace.test (trace-33.1): [Bug 527164]
Diffstat (limited to 'tests/trace.test')
-rw-r--r--tests/trace.test17
1 files changed, 16 insertions, 1 deletions
diff --git a/tests/trace.test b/tests/trace.test
index d236421..120c335 100644
--- a/tests/trace.test
+++ b/tests/trace.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: trace.test,v 1.34 2004/03/01 17:33:45 dgp Exp $
+# RCS: @(#) $Id: trace.test,v 1.35 2004/11/03 17:16:05 dgp Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -2197,6 +2197,21 @@ test trace-32.1 {
set result
} [list [list delete foo]]
+test trace-33.1 {527164: Keep -errorinfo of traces} {
+ unset -nocomplain x y
+ trace add variable x write {error foo;#}
+ trace add variable y write {set x 2;#}
+ list [catch {set y 1} msg opts] $msg [dict get $opts -errorinfo]
+} {1 {can't set "y": can't set "x": foo} {foo
+ while executing
+"error foo"
+ (write trace on "x")
+ invoked from within
+"set x 2"
+ (write trace on "y")
+ invoked from within
+"set y 1"}}
+
# Delete procedures when done, so we don't clash with other tests
# (e.g. foobar will clash with 'unknown' tests).
catch {rename foobar {}}