summaryrefslogtreecommitdiffstats
path: root/generic/tclCmdAH.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclCmdAH.c')
-rw-r--r--generic/tclCmdAH.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c
index 05bf91a..960b039 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.53 2004/10/06 09:07:12 dkf Exp $
+ * RCS: @(#) $Id: tclCmdAH.c,v 1.54 2004/10/15 04:01:28 dgp Exp $
*/
#include "tclInt.h"
@@ -280,17 +280,19 @@ Tcl_CatchObjCmd(dummy, interp, objc, objv)
iPtr->returnLevelKey, Tcl_NewIntObj(0));
}
- if (iPtr->flags & ERR_IN_PROGRESS) {
+ if (result == TCL_ERROR) {
+ /*
+ * When result was an error, fill in any missing values
+ * for -errorinfo, -errorcode, and -errorline
+ */
+
value = NULL;
Tcl_DictObjGet(NULL, options, iPtr->returnErrorinfoKey, &value);
if (NULL == value) {
Tcl_DictObjPut(NULL, options, iPtr->returnErrorinfoKey,
- Tcl_ObjGetVar2(interp, iPtr->execEnvPtr->errorInfo,
- NULL, TCL_GLOBAL_ONLY));
+ iPtr->errorInfo);
}
- }
- if (result == TCL_ERROR) {
value = NULL;
Tcl_DictObjGet(NULL, options, iPtr->returnErrorcodeKey, &value);
if (NULL == value) {