summaryrefslogtreecommitdiffstats
path: root/generic/tclCmdAH.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2004-09-17 22:59:12 (GMT)
committerdgp <dgp@users.sourceforge.net>2004-09-17 22:59:12 (GMT)
commit943be4691a0b7e656418187abe765d4c43190d17 (patch)
tree5d34faf294f095a400e608bc71536e1ee5249533 /generic/tclCmdAH.c
parent4ce4e4d5af827805c97d9f0c2a3d2953922f15d0 (diff)
downloadtcl-943be4691a0b7e656418187abe765d4c43190d17.zip
tcl-943be4691a0b7e656418187abe765d4c43190d17.tar.gz
tcl-943be4691a0b7e656418187abe765d4c43190d17.tar.bz2
* generic/tclBasic.c (Tcl_AddObjErrorInfo, Tcl_LogCommandInfo):
* generic/tclCmdAH.c ([catch], [error]): * generic/tclCmdMZ.c ([return]): * generic/tclProc.c (TclUpdateReturnInfo): * generic/tclResult.c (Tcl_SetErrorCodeVA, Tcl_SetObjErrorCode TclTransferResult): Refactored so that all errorCode setting flows through Tcl_SetObjErrorCode(). This greatly reduces the number of different places in the code that need to know details about an internal bitflag field of the Interp struct. Also places errorCode setting in one place for easier future mods.
Diffstat (limited to 'generic/tclCmdAH.c')
-rw-r--r--generic/tclCmdAH.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c
index 66ed491..9dbb644 100644
--- a/generic/tclCmdAH.c
+++ b/generic/tclCmdAH.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclCmdAH.c,v 1.45 2004/05/13 12:59:21 dkf Exp $
+ * RCS: @(#) $Id: tclCmdAH.c,v 1.46 2004/09/17 22:59:14 dgp Exp $
*/
#include "tclInt.h"
@@ -299,16 +299,6 @@ Tcl_CatchObjCmd(dummy, interp, objc, objv)
}
}
- if (iPtr->flags & ERROR_CODE_SET) {
- value = NULL;
- Tcl_DictObjGet(NULL, options, iPtr->returnErrorcodeKey, &value);
- if (NULL == value) {
- Tcl_DictObjPut(NULL, options, iPtr->returnErrorcodeKey,
- Tcl_ObjGetVar2(interp, iPtr->execEnvPtr->errorCode,
- NULL, TCL_GLOBAL_ONLY));
- }
- }
-
if (result == TCL_ERROR) {
value = NULL;
Tcl_DictObjGet(NULL, options, iPtr->returnErrorcodeKey, &value);
@@ -638,8 +628,7 @@ Tcl_ErrorObjCmd(dummy, interp, objc, objv)
}
if (objc == 4) {
- Tcl_SetVar2Ex(interp, "errorCode", NULL, objv[3], TCL_GLOBAL_ONLY);
- iPtr->flags |= ERROR_CODE_SET;
+ Tcl_SetObjErrorCode(interp, objv[3]);
}
Tcl_SetObjResult(interp, objv[1]);