From 1d2576b06d0ea9ba901a1716a495193c9004e623 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Tue, 19 Sep 2017 16:36:24 +0200 Subject: [PATCH] More custom exceptions --- fbchat/graphql.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fbchat/graphql.py b/fbchat/graphql.py index 83676f4..857d19e 100644 --- a/fbchat/graphql.py +++ b/fbchat/graphql.py @@ -146,8 +146,8 @@ def graphql_response_to_json(content): content = strip_to_json(content) # Usually only needed in some error cases try: j = json.loads(content, cls=ConcatJSONDecoder) - except Exception as e: - raise Exception('Error while parsing JSON: {}'.format(repr(content)), e) + except Exception: + raise FBchatException('Error while parsing JSON: {}'.format(repr(content))) rtn = [None]*(len(j)) for x in j: