summaryrefslogtreecommitdiffstats
path: root/generic/tclBasic.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2004-10-24 22:25:11 (GMT)
committerdgp <dgp@users.sourceforge.net>2004-10-24 22:25:11 (GMT)
commitc004a438e6863bc246919f6b40881f03e239c002 (patch)
tree21213c2618cd45d0eddb66c89f849d0f99dbb346 /generic/tclBasic.c
parent69969158b567bccb48c4a08baee34e4eb2004153 (diff)
downloadtcl-c004a438e6863bc246919f6b40881f03e239c002.zip
tcl-c004a438e6863bc246919f6b40881f03e239c002.tar.gz
tcl-c004a438e6863bc246919f6b40881f03e239c002.tar.bz2
* generic/tclBasic.c (Tcl_LogCommandInfo,Tcl_AddObjErrorInfo):
Shift the initialization of errorCode to NONE to more central location. * generic/tclEvent.c (BgError,Tcl_BackgroundError,HandleBgErrors): Rewrite to build on the new TclGet/SetReturnOptions routines. * generic/tclResult.c (TclGetReturnOptions): Add call to Tcl_AddObjErrorInfo to be sure error fields are initialized. * generic/tclResult.c (TclTransferResult): Rewrite to build on the new TclGet/SetReturnOptions routines.
Diffstat (limited to 'generic/tclBasic.c')
-rw-r--r--generic/tclBasic.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index b37e20d..0102390 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.132 2004/10/21 17:07:31 dgp Exp $
+ * RCS: @(#) $Id: tclBasic.c,v 1.133 2004/10/24 22:25:12 dgp Exp $
*/
#include "tclInt.h"
@@ -3251,9 +3251,6 @@ Tcl_LogCommandInfo(interp, script, command, length)
Tcl_AppendToObj(message, "\"", -1);
TclAppendObjToErrorInfo(interp, message);
Tcl_DecrRefCount(message);
- if (!iPtr->errorCode) {
- Tcl_SetErrorCode(interp, "NONE", NULL);
- }
}
/*
@@ -4425,6 +4422,9 @@ Tcl_AddObjErrorInfo(interp, message, length)
iPtr->errorInfo = iPtr->objResultPtr;
}
Tcl_IncrRefCount(iPtr->errorInfo);
+ if (!iPtr->errorCode) {
+ Tcl_SetErrorCode(interp, "NONE", NULL);
+ }
}
/*