diff options
author | Ask Solem <ask@rabbitmq.com> | 2012-06-19 16:52:40 +0200 |
---|---|---|
committer | Ask Solem <ask@rabbitmq.com> | 2012-06-19 16:52:40 +0200 |
commit | 68a82b3b7979f120a965ca30e6e47ac14e05abd2 (patch) | |
tree | 5fb320ca46bee8c8fae3c6c79b59e25b4f9f2435 | |
parent | 70ad705a2b7192e311e7123176525a6551f8453d (diff) | |
download | anyjson-68a82b3b7979f120a965ca30e6e47ac14e05abd2.tar.gz |
Reraise exceptions from original frame
-rw-r--r-- | anyjson/__init__.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/anyjson/__init__.py b/anyjson/__init__.py index bfe1acb..15423eb 100644 --- a/anyjson/__init__.py +++ b/anyjson/__init__.py @@ -85,7 +85,7 @@ class _JsonImplementation(object): try: return self._encode(data) except self._encode_error, exc: - raise TypeError(*exc.args) + raise TypeError, TypeError(*exc.args), sys.exc_info()[2] serialize = dumps def loads(self, s): @@ -97,7 +97,7 @@ class _JsonImplementation(object): return self._filedecode(StringIO(s)) return self._decode(s) except self._decode_error, exc: - raise ValueError(*exc.args) + raise ValueError, ValueError(*exc.args), sys.exc_info()[2] deserialize = loads |