Check that property exists

main
Bob Mottram 2020-11-19 10:20:02 +00:00
parent f84941ba42
commit 0dc731185c
1 changed files with 2 additions and 0 deletions

View File

@ -4474,6 +4474,8 @@ class JsonLdError(Exception):
self.causeTrace = traceback.extract_tb(*sys.exc_info()[2:])
def __str__(self):
if not hasattr(self, 'message'):
return 'Unknown exception'
rval = repr(self.message)
rval += '\nType: ' + self.type
if self.code: