diff options
author | Cenk Alti <cenkalti@gmail.com> | 2018-03-01 01:02:33 +0300 |
---|---|---|
committer | Ashley Camba <ashwoods@gmail.com> | 2018-04-18 11:43:08 +0200 |
commit | 53129b2197b2b43d4c20a37e3d4c598445422b53 (patch) | |
tree | c0d7279026098b0095fd6db3e4c729d619957607 /raven/utils | |
parent | d75531762b1dab1585b80e93df8ee88acdd1cec8 (diff) | |
download | raven-53129b2197b2b43d4c20a37e3d4c598445422b53.tar.gz |
fix raven.utils.json.dumps exception
Diffstat (limited to 'raven/utils')
-rw-r--r-- | raven/utils/json.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/raven/utils/json.py b/raven/utils/json.py index afbd386..a727f72 100644 --- a/raven/utils/json.py +++ b/raven/utils/json.py @@ -35,7 +35,10 @@ class BetterJSONEncoder(json.JSONEncoder): try: return super(BetterJSONEncoder, self).default(obj) except TypeError: - return repr(obj) + try: + return repr(obj) + except Exception: + return object.__repr__(obj) return encoder(obj) |