Uses exception __string__, not __repr__ to carry message.
This commit is contained in:
parent
b12c6297f0
commit
6366f4bd01
@ -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)
|
||||
|
||||
|
||||
|
@ -87,7 +87,7 @@ class PrintUI(object):
|
||||
if self.debug:
|
||||
raise exc
|
||||
else:
|
||||
self.error(exc)
|
||||
self.error(exc.__string__())
|
||||
self.exit()
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user