Skip to content

Commit

Permalink
Print error messages with line numbers)
Browse files Browse the repository at this point in the history
  • Loading branch information
DasSkelett committed Dec 16, 2019
1 parent 3afe16c commit 497817a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions validator/main.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import fnmatch
import json
import os
import re
from pathlib import Path

import jsonschema
Expand Down Expand Up @@ -39,7 +37,7 @@ def main():
json_file = json.load(vf)
except json.decoder.JSONDecodeError as e:
print('Failed loading JSON file. Check for syntax errors around the mentioned line:')
print(e.msg)
print(e)
failed = True
failed_files.append(f.name)
continue
Expand All @@ -49,7 +47,7 @@ def main():
jsonschema.validate(json_file, schema)
except jsonschema.ValidationError as e:
print('Validation failed:')
print(e.message)
print(e)
failed = True
failed_files.append(f.name)
continue
Expand Down

0 comments on commit 497817a

Please sign in to comment.