summaryrefslogtreecommitdiffstats
path: root/tests/trace.test
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2013-08-15 19:59:32 (GMT)
committerdgp <dgp@users.sourceforge.net>2013-08-15 19:59:32 (GMT)
commitc084f0ea7500fe34df2ba6f00c46d310dbe542a0 (patch)
tree53980304ebd4b378c6e5926bd746ac753440f77d /tests/trace.test
parentfe60431f5338aefb240b653c800fdcfe6c720706 (diff)
parent5cdaf0e05bd402111776b93b830743a9746ad571 (diff)
downloadtcl-c084f0ea7500fe34df2ba6f00c46d310dbe542a0.zip
tcl-c084f0ea7500fe34df2ba6f00c46d310dbe542a0.tar.gz
tcl-c084f0ea7500fe34df2ba6f00c46d310dbe542a0.tar.bz2
Make sure the errors raised by execution traces become errors raised by the
traced command, as documented. Deletion of the traced command was supressing that.
Diffstat (limited to 'tests/trace.test')
-rw-r--r--tests/trace.test7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/trace.test b/tests/trace.test
index a3a5604..d830f3c 100644
--- a/tests/trace.test
+++ b/tests/trace.test
@@ -2661,6 +2661,13 @@ test trace-39.1 {bug #3485022: tracing Bc'ed commands} -setup {
rename dotrace {}
rename foo {}
} -result {3 | 0 1 1}
+
+test trace-40.1 {execution trace errors become command errors} {
+ proc foo args {}
+ trace add execution foo enter {rename foo {}; error bar;#}
+ catch foo m
+ return -level 0 $m[unset m]
+} bar
# Delete procedures when done, so we don't clash with other tests
# (e.g. foobar will clash with 'unknown' tests).