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.message = message
|
||||||
self.citekey = citekey
|
self.citekey = citekey
|
||||||
|
|
||||||
def __repr__(self):
|
def __str__(self):
|
||||||
return self.message or self.default_msg.format(self.citekey)
|
return self.message or self.default_msg.format(self.citekey)
|
||||||
|
|
||||||
|
|
||||||
|
@ -87,7 +87,7 @@ class PrintUI(object):
|
|||||||
if self.debug:
|
if self.debug:
|
||||||
raise exc
|
raise exc
|
||||||
else:
|
else:
|
||||||
self.error(exc)
|
self.error(exc.__string__())
|
||||||
self.exit()
|
self.exit()
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user