Author: Matti Picus <matti.pi...@gmail.com>
Branch: 
Changeset: r96087:5802580694f9
Date: 2019-02-19 11:33 +0200
http://bitbucket.org/pypy/pypy/changeset/5802580694f9/

Log:    add an error message for out-of-range

diff --git a/rpython/rlib/rutf8.py b/rpython/rlib/rutf8.py
--- a/rpython/rlib/rutf8.py
+++ b/rpython/rlib/rutf8.py
@@ -89,7 +89,7 @@
         builder.append(chr((0x80 | ((code >> 6) & 0x3f))))
         builder.append(chr((0x80 | (code & 0x3f))))
         return
-    raise ValueError
+    raise ValueError('character U+%x is not in range [U+0000; U+10ffff]' % 
code)
 
 @dont_inline
 def _nonascii_unichr_as_utf8_append_nosurrogates(builder, code):
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to