This commit is contained in:
Mihaly Varadi 2019-11-01 13:52:48 +00:00
parent 7a60569631
commit a99fd6fd4e
2 changed files with 11 additions and 4 deletions

View file

@ -87,8 +87,8 @@ class Validator(object):
with open(path, "r") as json_file:
try:
return json.load(json_file)
except json.decoder.JSONDecodeError as err:
self.error_log = "JSON error: %s" % err
except:
self.error_log = "JSON error: %s" % path
return None
except IOError as ioerr:
self.error_log = "File error: %s" % ioerr