Skip to content

Commit

Permalink
print error msg when parsing of json categories file fails
Browse files Browse the repository at this point in the history
  • Loading branch information
Kraymer committed Oct 3, 2015
1 parent 9307375 commit b378e9f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion qifqif/tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ def load(filepath):
global TAGS
if os.path.isfile(filepath):
with open(filepath, 'r') as cfg:
TAGS = json.load(cfg)
try:
TAGS = json.load(cfg)
except Exception as e:
print("Error loading '%s'.\n%s" % (filepath, e))
exit(1)
else:
TAGS = {}
return TAGS
Expand Down

0 comments on commit b378e9f

Please sign in to comment.