class documentation

class ErrorString(SafeString):

View In Hierarchy

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​_errors Undocumented
Instance Variable encoding Undocumented
Instance Variable encoding​_errors Undocumented
def __str__(self):
def __unicode__(self):

Return unicode representation of self.data.

Try unicode(self.data), catch UnicodeError and

  • if self.data is an Exception instance, work around http://bugs.python.org/issue2517 with an emulation of Exception.__unicode__,
  • else decode with self.encoding and self.decoding_errors.