Show More
@@ -20,6 +20,7 b' import locale' | |||||
20 | import logging |
|
20 | import logging | |
21 | import uuid |
|
21 | import uuid | |
22 | import wsgiref.util |
|
22 | import wsgiref.util | |
|
23 | import traceback | |||
23 | from itertools import chain |
|
24 | from itertools import chain | |
24 |
|
25 | |||
25 | import msgpack |
|
26 | import msgpack | |
@@ -227,6 +228,8 b' class HTTPApplication(object):' | |||||
227 | try: |
|
228 | try: | |
228 | resp = getattr(remote, method)(*args, **kwargs) |
|
229 | resp = getattr(remote, method)(*args, **kwargs) | |
229 | except Exception as e: |
|
230 | except Exception as e: | |
|
231 | tb_info = traceback.format_exc() | |||
|
232 | ||||
230 | type_ = e.__class__.__name__ |
|
233 | type_ = e.__class__.__name__ | |
231 | if type_ not in self.ALLOWED_EXCEPTIONS: |
|
234 | if type_ not in self.ALLOWED_EXCEPTIONS: | |
232 | type_ = None |
|
235 | type_ = None | |
@@ -235,6 +238,7 b' class HTTPApplication(object):' | |||||
235 | 'id': payload.get('id'), |
|
238 | 'id': payload.get('id'), | |
236 | 'error': { |
|
239 | 'error': { | |
237 | 'message': e.message, |
|
240 | 'message': e.message, | |
|
241 | 'traceback': tb_info, | |||
238 | 'type': type_ |
|
242 | 'type': type_ | |
239 | } |
|
243 | } | |
240 | } |
|
244 | } |
General Comments 0
You need to be logged in to leave comments.
Login now