1.1 --- a/lib/__builtins__/exception/unicode.py Thu Jan 12 23:29:39 2017 +0100
1.2 +++ b/lib/__builtins__/exception/unicode.py Thu Jan 12 23:50:26 2017 +0100
1.3 @@ -3,7 +3,7 @@
1.4 """
1.5 Unicode exception objects.
1.6
1.7 -Copyright (C) 2015, 2016 Paul Boddie <paul@boddie.org.uk>
1.8 +Copyright (C) 2015, 2016, 2017 Paul Boddie <paul@boddie.org.uk>
1.9
1.10 This program is free software; you can redistribute it and/or modify it under
1.11 the terms of the GNU General Public License as published by the Free Software
1.12 @@ -19,7 +19,13 @@
1.13 this program. If not, see <http://www.gnu.org/licenses/>.
1.14 """
1.15
1.16 -class UnicodeDecodeError(Exception):
1.17 +class UnicodeError(ValueError):
1.18 +
1.19 + "A general Unicode error."
1.20 +
1.21 + pass
1.22 +
1.23 +class UnicodeDecodeError(UnicodeError):
1.24
1.25 """
1.26 An exception indicating a failure to interpret a byte sequence according to
1.27 @@ -35,9 +41,7 @@
1.28
1.29 self.value = value
1.30
1.31 -class UnicodeEncodeError(Exception): pass
1.32 -class UnicodeError(Exception): pass
1.33 -class UnicodeTranslateError(Exception): pass
1.34 -class UnicodeWarning(Warning): pass
1.35 +class UnicodeEncodeError(UnicodeError): pass
1.36 +class UnicodeTranslateError(UnicodeError): pass
1.37
1.38 # vim: tabstop=4 expandtab shiftwidth=4