[Python-checkins] cpython (merge 3.2 -> default): (Merge 3.2) Issue #12342: Improve _tkinter error message on unencodable
victor.stinner
python-checkins at python.org
Fri Nov 4 00:42:18 CET 2011
http://hg.python.org/cpython/rev/5aea95d41ad2
changeset: 73341:5aea95d41ad2
parent: 73339:cc0ff80a834b
parent: 73340:9a07b73abdb1
user: Victor Stinner <victor.stinner at haypocalc.com>
date: Fri Nov 04 00:43:35 2011 +0100
summary:
(Merge 3.2) Issue #12342: Improve _tkinter error message on unencodable character
files:
Modules/_tkinter.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c
--- a/Modules/_tkinter.c
+++ b/Modules/_tkinter.c
@@ -990,8 +990,10 @@
#if TCL_UTF_MAX == 3
if (ch >= 0x10000) {
/* Tcl doesn't do UTF-16, yet. */
- PyErr_SetString(PyExc_ValueError,
- "unsupported character");
+ PyErr_Format(PyExc_ValueError,
+ "character U+%x is above the range "
+ "(U+0000-U+FFFF) allowed by Tcl",
+ inbuf[i]);
ckfree(FREECAST outbuf);
return NULL;
#endif
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list