diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2011-11-04 00:43:35 +0100 |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2011-11-04 00:43:35 +0100 |
commit | af06fb9eefd3b32e5b06da6bf8fd0fa291b4bf8e (patch) | |
tree | 00bc959b6adf34d3d149651af3c6ce7d63f7b6fe /Modules | |
parent | 451d9377cdd1c71931639673b9e49e130d61582d (diff) | |
parent | fb9a1a8f36da7ab6738de23a10070b5d64237f6f (diff) | |
download | cpython-af06fb9eefd3b32e5b06da6bf8fd0fa291b4bf8e.tar.gz |
(Merge 3.2) Issue #12342: Improve _tkinter error message on unencodable character
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_tkinter.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c index ffb8ab08c9..f42f068bb3 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 |