diff options
author | dgp <dgp@users.sourceforge.net> | 2006-10-31 20:19:43 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2006-10-31 20:19:43 (GMT) |
commit | ce16019300e66b466f8ad327c5b3a03fe6876f8e (patch) | |
tree | 75652e34b31819c0360f9598db333054faffde99 /generic/tclCmdAH.c | |
parent | 20c1156972864f916da62a217137e346eb93ac79 (diff) | |
download | tcl-ce16019300e66b466f8ad327c5b3a03fe6876f8e.zip tcl-ce16019300e66b466f8ad327c5b3a03fe6876f8e.tar.gz tcl-ce16019300e66b466f8ad327c5b3a03fe6876f8e.tar.bz2 |
* generic/tclBasic.c: Refactored and renamed the routines
* generic/tclCkalloc.c: TclObjPrintf, TclFormatObj, and
* generic/tclCmdAH.c: TclFormatToErrorInfo to a new set of
* generic/tclCmdIL.c: routines TclAppendPrintfToObj,
* generic/tclCmdMZ.c: TclAppendFormatToObj, TclObjPrintf, and
* generic/tclDictObj.c: TclObjFormat, with the intent of making
* generic/tclExecute.c: the latter list, plus TclAppendLimitedToObj
* generic/tclIORChan.c: and TclAppendObjToErrorInfo, public via
* generic/tclIOUtil.c: a revised TIP 270.
* generic/tclInt.h:
* generic/tclMain.c:
* generic/tclNamesp.c:
* generic/tclParseExpr.c:
* generic/tclPkg.c:
* generic/tclProc.c:
* generic/tclStringObj.c:
* generic/tclTimer.c:
* generic/tclUtil.c:
* unix/tclUnixFCmd.c:
Diffstat (limited to 'generic/tclCmdAH.c')
-rw-r--r-- | generic/tclCmdAH.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c index f2c49cb..07164d9 100644 --- a/generic/tclCmdAH.c +++ b/generic/tclCmdAH.c @@ -10,7 +10,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.75 2006/08/10 12:15:30 dkf Exp $ + * RCS: @(#) $Id: tclCmdAH.c,v 1.76 2006/10/31 20:19:44 dgp Exp $ */ #include "tclInt.h" @@ -188,8 +188,9 @@ Tcl_CaseObjCmd(dummy, interp, objc, objv) armPtr = caseObjv[body - 1]; result = Tcl_EvalObjEx(interp, caseObjv[body], 0); if (result == TCL_ERROR) { - TclFormatToErrorInfo(interp, "\n (\"%.50s\" arm line %d)", - TclGetString(armPtr), interp->errorLine); + TclAppendObjToErrorInfo(interp, TclObjPrintf(NULL, + "\n (\"%.50s\" arm line %d)", + TclGetString(armPtr), interp->errorLine)); } return result; } @@ -250,8 +251,8 @@ Tcl_CatchObjCmd(dummy, interp, objc, objv) */ if (Tcl_LimitExceeded(interp)) { - TclFormatToErrorInfo(interp, "\n (\"catch\" body line %d)", - interp->errorLine); + TclAppendObjToErrorInfo(interp, TclObjPrintf(NULL, + "\n (\"catch\" body line %d)", interp->errorLine)); return TCL_ERROR; } @@ -659,8 +660,8 @@ Tcl_EvalObjCmd(dummy, interp, objc, objv) result = Tcl_EvalObjEx(interp, objPtr, TCL_EVAL_DIRECT); } if (result == TCL_ERROR) { - TclFormatToErrorInfo(interp,"\n (\"eval\" body line %d)", - interp->errorLine); + TclAppendObjToErrorInfo(interp, TclObjPrintf(NULL, + "\n (\"eval\" body line %d)", interp->errorLine)); } return result; } @@ -1611,8 +1612,8 @@ Tcl_ForObjCmd(dummy, interp, objc, objv) result = Tcl_EvalObjEx(interp, objv[4], 0); if ((result != TCL_OK) && (result != TCL_CONTINUE)) { if (result == TCL_ERROR) { - TclFormatToErrorInfo(interp, "\n (\"for\" body line %d)", - interp->errorLine); + TclAppendObjToErrorInfo(interp, TclObjPrintf(NULL, + "\n (\"for\" body line %d)", interp->errorLine)); } break; } @@ -1821,8 +1822,8 @@ Tcl_ForeachObjCmd(dummy, interp, objc, objv) result = TCL_OK; break; } else if (result == TCL_ERROR) { - TclFormatToErrorInfo(interp, - "\n (\"foreach\" body line %d)", interp->errorLine); + TclAppendObjToErrorInfo(interp, TclObjPrintf(NULL, + "\n (\"foreach\" body line %d)", interp->errorLine)); break; } else { break; |