Format error type in a different way

This commit is contained in:
George Edward Bulmer 2018-02-11 23:16:04 +00:00
parent 21a50cf961
commit 72103ec730

View File

@ -92,7 +92,8 @@ class ConfigErrorDesc:
traceback = attr.ib(None)
def __str__(self):
return '{}: {} '.format(self.text, repr(self.exception))
return '{} - {}: {} '.format(self.text,
self.exception.__class__.__name__, self.exception)
def with_text(self, text):
"""Get a new ConfigErrorDesc with the given text appended."""