[pypy-commit] pypy default: use rutf8.OutOfRange error
mattip
pypy.commits at gmail.com
Tue Feb 19 14:23:52 EST 2019
Author: Matti Picus <matti.picus at gmail.com>
Branch:
Changeset: r96099:59c374d988c1
Date: 2019-02-19 21:22 +0200
http://bitbucket.org/pypy/pypy/changeset/59c374d988c1/
Log: use rutf8.OutOfRange error
diff --git a/pypy/interpreter/unicodehelper.py b/pypy/interpreter/unicodehelper.py
--- a/pypy/interpreter/unicodehelper.py
+++ b/pypy/interpreter/unicodehelper.py
@@ -403,7 +403,7 @@
try:
builder.append_code(chr)
pos += digits
- except ValueError:
+ except rutf8.OutOfRange:
message = "illegal Unicode character"
res, pos = errorhandler(
errors, encoding, message, s, pos - 2, pos + digits)
More information about the pypy-commit
mailing list