Uses exception __string__, not __repr__ to carry message.

This commit is contained in:
Olivier Mangin 2016-01-13 15:28:13 -05:00
parent b12c6297f0
commit 6366f4bd01
2 changed files with 2 additions and 2 deletions

View File

@ -20,7 +20,7 @@ class CiteKeyError(Exception):
self.message = message
self.citekey = citekey
def __repr__(self):
def __str__(self):
return self.message or self.default_msg.format(self.citekey)

View File

@ -87,7 +87,7 @@ class PrintUI(object):
if self.debug:
raise exc
else:
self.error(exc)
self.error(exc.__string__())
self.exit()