class documentation
class ErrorString(SafeString): (source)
Constructor: ErrorString(data, encoding, encoding_errors, decoding_errors)
Safely report exception type and message.
| Method | __str__ |
Undocumented |
| Method | __unicode__ |
Return unicode representation of self.data. |
Inherited from SafeString:
| Method | __init__ |
Undocumented |
| Instance Variable | data |
Undocumented |
| Instance Variable | decoding |
Undocumented |
| Instance Variable | encoding |
Undocumented |
| Instance Variable | encoding |
Undocumented |
Return unicode representation of self.data.
Try unicode(self.data), catch UnicodeError and
- if
self.datais an Exception instance, work around http://bugs.python.org/issue2517 with an emulation of Exception.__unicode__, - else decode with
self.encodingandself.decoding_errors.