diff options
author | dgp <dgp@noemail.net> | 2003-10-08 23:18:15 (GMT) |
---|---|---|
committer | dgp <dgp@noemail.net> | 2003-10-08 23:18:15 (GMT) |
commit | 2fef4ec6d910916e2ed2c3a25d12da2608711307 (patch) | |
tree | 0715cd69d91759baf02ed0b19e4c90f2503898c2 /generic | |
parent | 8f45e9630f299a53e02156d32e58fda441a86695 (diff) | |
download | tcl-2fef4ec6d910916e2ed2c3a25d12da2608711307.zip tcl-2fef4ec6d910916e2ed2c3a25d12da2608711307.tar.gz tcl-2fef4ec6d910916e2ed2c3a25d12da2608711307.tar.bz2 |
* generic/tclBasic.c: Save and restore the iPtr->flag bits that
control the state of errorCode and errorInfo management when calling
"leave" execution traces, so that all error information of the traced
command is still available whether traced or not. [Bug 760947]
Thanks to Yahalom Emet.
FossilOrigin-Name: 770447146a89b600cb0142dd6cee5211a7570b38
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclBasic.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c index dc4fe90..0a32cbf 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.75.2.7 2003/10/03 20:31:23 dgp Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.75.2.8 2003/10/08 23:18:17 dgp Exp $ */ #include "tclInt.h" @@ -3095,6 +3095,8 @@ TclEvalObjvInternal(interp, objc, objv, command, length, flags) * Call 'leave' command traces */ if (!(cmdPtr->flags & CMD_IS_DELETED)) { + int saveErrFlags = iPtr->flags + & (ERR_IN_PROGRESS | ERR_ALREADY_LOGGED | ERROR_CODE_SET); if ((cmdPtr->flags & CMD_HAS_EXEC_TRACES) && (traceCode == TCL_OK)) { traceCode = TclCheckExecutionTraces (interp, command, length, cmdPtr, code, TCL_TRACE_LEAVE_EXEC, objc, objv); @@ -3103,6 +3105,9 @@ TclEvalObjvInternal(interp, objc, objv, command, length, flags) traceCode = TclCheckInterpTraces(interp, command, length, cmdPtr, code, TCL_TRACE_LEAVE_EXEC, objc, objv); } + if (traceCode == TCL_OK) { + iPtr->flags |= saveErrFlags; + } } TclCleanupCommand(cmdPtr); |