summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2013-08-15 19:55:26 (GMT)
committerdgp <dgp@users.sourceforge.net>2013-08-15 19:55:26 (GMT)
commit86d682b82273fd98a4259df86f4303bc65a896b6 (patch)
tree3a85bbb7f05c565e3a5f4b95c05501ee534c74d8 /tests
parent2916d083d8e80db13d25190cdc1534aad0cf67ad (diff)
downloadtcl-86d682b82273fd98a4259df86f4303bc65a896b6.zip
tcl-86d682b82273fd98a4259df86f4303bc65a896b6.tar.gz
tcl-86d682b82273fd98a4259df86f4303bc65a896b6.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')
-rw-r--r--tests/trace.test7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/trace.test b/tests/trace.test
index 24279f5..9c01908 100644
--- a/tests/trace.test
+++ b/tests/trace.test
@@ -2658,6 +2658,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).