diff options
-rw-r--r-- | generic/tclBasic.c | 6 | ||||
-rw-r--r-- | tests/trace.test | 7 |
2 files changed, 10 insertions, 3 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c index dd6a40b..4a95340 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -4188,12 +4188,12 @@ TclNREvalObjv( result = TEOV_RunEnterTraces(interp, &cmdPtr, TclGetSourceFromFrame( flags & TCL_EVAL_SOURCE_IN_FRAME ? iPtr->cmdFramePtr : NULL, objc, objv), objc, objv, lookupNsPtr); - if (!cmdPtr) { - return TEOV_NotFound(interp, objc, objv, lookupNsPtr); - } if (result != TCL_OK) { return result; } + if (!cmdPtr) { + return TEOV_NotFound(interp, objc, objv, lookupNsPtr); + } } 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). |