module documentation
Error reporting should be safe from encoding/decoding errors. However, implicit conversions of strings and exceptions like
>>> u'%s world: %s' % ('Hällo', Exception(u'Hällo')
fail in some Python versions:
- In Python <= 2.6, unicode(<exception instance>) uses
__str__
and fails with non-ASCII chars in`unicode` arguments. (work around http://bugs.python.org/issue2517): - In Python 2, unicode(<exception instance>) fails, with non-ASCII chars in arguments. (Use case: in some locales, the errstr argument of IOError contains non-ASCII chars.)
- In Python 2, str(<exception instance>) fails, with non-ASCII chars
in
unicode
arguments.
The SafeString
, ErrorString
and ErrorOutput
classes handle
common exceptions.
Class |
|
Wrapper class for file-like error streams with failsave de- and encoding of str , bytes , unicode and Exception instances. |
Class |
|
Safely report exception type and message. |
Class |
|
A wrapper providing robust conversion to str and unicode . |
Variable | locale |
Undocumented |