index at which an unknown %-escape was found
break;
default:
PyErr_Format(PyExc_ValueError,
- "unsupported format character '%c' (0x%x)",
- c, c);
+ "unsupported format character '%c' (0x%x) "
+ "at index %i",
+ c, c, fmt - 1 - PyString_AsString(format));
goto error;
}
if (sign) {
default:
PyErr_Format(PyExc_ValueError,
- "unsupported format character '%c' (0x%x)",
- c, c);
+ "unsupported format character '%c' (0x%x) "
+ "at index %i",
+ c, c, fmt -1 - PyUnicode_AS_UNICODE(uformat));
goto onError;
}
if (sign) {