From 1cfae03f5622dbb21d22217d25c72aa93611ab7b Mon Sep 17 00:00:00 2001 From: dgp Date: Sun, 5 Nov 2006 04:16:07 +0000 Subject: * generic/tclStringObj.c: Changed Tcl_ObjPrintf() response to an invalid format specifier string. No longer panics; now produces an error message as output. --- ChangeLog | 4 ++++ generic/tclStringObj.c | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7e9544c..24caa04 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2006-11-04 Don Porter + * generic/tclStringObj.c: Changed Tcl_ObjPrintf() response to + an invalid format specifier string. No longer panics; now produces + an error message as output. + TIP#274 IMPLEMENTATION * generic/tclParseExpr.c: Exponentiation operator is now diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index f4668d4..2e722c4 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.61 2006/11/02 16:57:54 dgp Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.62 2006/11/05 04:16:07 dgp Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -2456,7 +2456,8 @@ AppendPrintfToObjVA( Tcl_ListObjGetElements(NULL, list, &objc, &objv); code = TclAppendFormatToObj(NULL, objPtr, format, objc, objv); if (code != TCL_OK) { - Tcl_Panic("Unable to format \"%s\" with supplied arguments: %s", + TclAppendPrintfToObj(objPtr, + "Unable to format \"%s\" with supplied arguments: %s", format, Tcl_GetString(list)); } Tcl_DecrRefCount(list); -- cgit v0.12