Skip to content

Commit

Permalink
Include more information when json parsing fails
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianludwin authored and Commit Bot committed Aug 4, 2017
1 parent 53d6666 commit 82ffcae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/isolated_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,8 +436,8 @@ def load_isolated(content, algo):
"""
try:
data = json.loads(content)
except ValueError:
raise IsolatedError('Failed to parse: %s...' % content[:100])
except ValueError as v:
raise IsolatedError('Failed to parse (%s): %s...' % (v, content[:100]))

if not isinstance(data, dict):
raise IsolatedError('Expected dict, got %r' % data)
Expand Down

0 comments on commit 82ffcae

Please sign in to comment.