Change exception __str__ to be the type + message

Because the repr is ugly
This commit is contained in:
voussoir 2017-11-16 16:31:10 -08:00
parent a510c7b55c
commit 73d2ef5bbf

View file

@ -27,6 +27,9 @@ class EtiquetteException(Exception, metaclass=ErrorTypeAdder):
self.error_message = self.error_message.format(*args, **kwargs)
self.args = (self.error_message, args, kwargs)
def __str__(self):
return self.error_type + '\n' + self.error_message
# NO SUCH
class NoSuch(EtiquetteException):