diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2011-04-04 13:40:01 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2011-04-04 13:40:01 (GMT) |
commit | 25e4dca4916e5ae7be29bb21c40e59f3adb4b5ec (patch) | |
tree | eebeebaa58948935075500c432b9c53885fe1d6b /generic/tclCmdAH.c | |
parent | 2205a28b9e00ec29977d2b21e2f2bda3b77aaaf4 (diff) | |
download | tcl-25e4dca4916e5ae7be29bb21c40e59f3adb4b5ec.zip tcl-25e4dca4916e5ae7be29bb21c40e59f3adb4b5ec.tar.gz tcl-25e4dca4916e5ae7be29bb21c40e59f3adb4b5ec.tar.bz2 |
Better error-message in case of errors related to setting a variable
Diffstat (limited to 'generic/tclCmdAH.c')
-rw-r--r-- | generic/tclCmdAH.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c index 3edfa54..8b5f13d 100644 --- a/generic/tclCmdAH.c +++ b/generic/tclCmdAH.c @@ -345,10 +345,7 @@ CatchObjCmdCallback( if (objc >= 3) { if (NULL == Tcl_ObjSetVar2(interp, varNamePtr, NULL, - Tcl_GetObjResult(interp), 0)) { - Tcl_ResetResult(interp); - Tcl_AppendResult(interp, - "couldn't save command result in variable", NULL); + Tcl_GetObjResult(interp), TCL_LEAVE_ERR_MSG)) { return TCL_ERROR; } } @@ -356,11 +353,8 @@ CatchObjCmdCallback( Tcl_Obj *options = Tcl_GetReturnOptions(interp, result); if (NULL == Tcl_ObjSetVar2(interp, optionVarNamePtr, NULL, - options, 0)) { + options, TCL_LEAVE_ERR_MSG)) { Tcl_DecrRefCount(options); - Tcl_ResetResult(interp); - Tcl_AppendResult(interp, - "couldn't save return options in variable", NULL); return TCL_ERROR; } } |