summaryrefslogtreecommitdiffstats
path: root/generic/tclExecute.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2017-10-23 16:20:18 (GMT)
committerdgp <dgp@users.sourceforge.net>2017-10-23 16:20:18 (GMT)
commit172896b15a2b5b8a1163c9de824e20297a876ed5 (patch)
tree6074d964f252d4293d75e502e72d89b131206e3e /generic/tclExecute.c
parente9b584f81b87c299c819443f22bc5a81b20fff38 (diff)
downloadtcl-172896b15a2b5b8a1163c9de824e20297a876ed5.zip
tcl-172896b15a2b5b8a1163c9de824e20297a876ed5.tar.gz
tcl-172896b15a2b5b8a1163c9de824e20297a876ed5.tar.bz2
Implementation branch for TIP 114 - Eliminate Octal Parsing...
Diffstat (limited to 'generic/tclExecute.c')
-rw-r--r--generic/tclExecute.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index f4c71ec..d43ddfd 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.c
@@ -9626,16 +9626,7 @@ IllegalExprOperandType(
}
if (GetNumberFromObj(NULL, opndPtr, &ptr, &type) != TCL_OK) {
- int numBytes;
- const char *bytes = TclGetStringFromObj(opndPtr, &numBytes);
-
- if (numBytes == 0) {
- description = "empty string";
- } else if (TclCheckBadOctal(NULL, bytes)) {
- description = "invalid octal number";
- } else {
- description = "non-numeric string";
- }
+ description = "non-numeric string";
} else if (type == TCL_NUMBER_NAN) {
description = "non-numeric floating-point value";
} else if (type == TCL_NUMBER_DOUBLE) {
@@ -9646,7 +9637,8 @@ IllegalExprOperandType(
}
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
- "can't use %s as operand of \"%s\"", description, operator));
+ "can't use %s \"%s\" as operand of \"%s\"", description,
+ Tcl_GetString(opndPtr), operator));
Tcl_SetErrorCode(interp, "ARITH", "DOMAIN", description, NULL);
}