Tcl Source Code

Check-in [04da25f2f5]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment: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.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 04da25f2f5b8ce72c42f217d4e745d9c33fc8f70
User & Date: dgp 2013-08-15 19:59:32
Context
2013-08-21
10:25
[3612422]: Refer to correct part of tclvars(n) rather than page itself. check-in: a197e6853e user: dkf tags: trunk
09:35
define tests for this bug; no fix yet check-in: b58873a477 user: dkf tags: bug-3609693
2013-08-19
15:22
Testing doing away with the NRRunObjProc routine, which looks like a useless extra bounce on the NRE... check-in: a9eba981e6 user: dgp tags: dgp-purge-NRRunObjProc
09:10
rebase TIP 425 implementation check-in: 74f7e63465 user: jan.nijtmans tags: win-console-panic
09:05
rebase TIP 414 implementation check-in: 3c9828933f user: jan.nijtmans tags: initsubsystems
2013-08-15
20:00
merge trunk check-in: 5f37dcc364 user: dgp tags: bug-2502002
19:59
merge trunk check-in: bebd66fb8b user: dgp tags: dgp-refactor
19:59
Make sure the errors raised by execution traces become errors raised by the traced command, as docum... check-in: 04da25f2f5 user: dgp tags: trunk
19:55
Make sure the errors raised by execution traces become errors raised by the traced command, as docum... check-in: f3fac8ede1 user: dgp tags: core-8-5-branch
14:05
The fix for [3610404] leads to a simplification in the implementation of forward methods. check-in: 1cafa9ed0e user: dgp tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/tclBasic.c.

4184
4185
4186
4187
4188
4189
4190



4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
	 * Call enter traces. They will schedule a call to the leave traces if
	 * necessary.
	 */

	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;
	}
    }


#ifdef USE_DTRACE
    if (TCL_DTRACE_CMD_ARGS_ENABLED()) {
	const char *a[10];
	int i = 0;







>
>
>



<
<
<







4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196



4197
4198
4199
4200
4201
4202
4203
	 * Call enter traces. They will schedule a call to the leave traces if
	 * necessary.
	 */

	result = TEOV_RunEnterTraces(interp, &cmdPtr, TclGetSourceFromFrame(
		flags & TCL_EVAL_SOURCE_IN_FRAME ?  iPtr->cmdFramePtr : NULL,
		objc, objv), objc, objv, lookupNsPtr);
	if (result != TCL_OK) {
	    return result;
	}
	if (!cmdPtr) {
	    return TEOV_NotFound(interp, objc, objv, lookupNsPtr);
	}



    }


#ifdef USE_DTRACE
    if (TCL_DTRACE_CMD_ARGS_ENABLED()) {
	const char *a[10];
	int i = 0;

Changes to tests/trace.test.

2657
2658
2659
2660
2661
2662
2663







2664
2665
2666
2667
2668
2669
2670

    list $::traceCalls | {*}$res
} -cleanup {
    unset ::traceLog ::traceCalls res
    rename dotrace {}
    rename foo {}
} -result {3 | 0 1 1}







    
# Delete procedures when done, so we don't clash with other tests
# (e.g. foobar will clash with 'unknown' tests).
catch {rename foobar {}}
catch {rename foo {}}
catch {rename bar {}}
catch {rename untraced {}}







>
>
>
>
>
>
>







2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677

    list $::traceCalls | {*}$res
} -cleanup {
    unset ::traceLog ::traceCalls res
    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).
catch {rename foobar {}}
catch {rename foo {}}
catch {rename bar {}}
catch {rename untraced {}}