summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-11-03 23:43:35 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-11-03 23:43:35 (GMT)
commit6777e6f9b1d2756aa59c57b554395e5fc0a9f540 (patch)
tree07e96bf184cad7bd4f35d8cb67ddda4e2f7e3612 /Modules
parentfcd96536675fcf418ed5be2f12429f8da5a89348 (diff)
parent7ab4192e82154e6d61b635f493ed6c36231614ad (diff)
downloadcpython-6777e6f9b1d2756aa59c57b554395e5fc0a9f540.zip
cpython-6777e6f9b1d2756aa59c57b554395e5fc0a9f540.tar.gz
cpython-6777e6f9b1d2756aa59c57b554395e5fc0a9f540.tar.bz2
(Merge 3.2) Issue #12342: Improve _tkinter error message on unencodable character
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_tkinter.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c
index ffb8ab0..f42f068 100644
--- a/Modules/_tkinter.c
+++ b/Modules/_tkinter.c
@@ -990,8 +990,10 @@ AsObj(PyObject *value)
#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