Show More
@@ -20,11 +20,10 b'' | |||
|
20 | 20 | |
|
21 | 21 | import json |
|
22 | 22 | import logging |
|
23 |
import |
|
|
23 | import traceback | |
|
24 | 24 | import threading |
|
25 | 25 | from BaseHTTPServer import BaseHTTPRequestHandler |
|
26 | 26 | from SocketServer import TCPServer |
|
27 | from routes.util import URLGenerator | |
|
28 | 27 | |
|
29 | 28 | import pylons |
|
30 | 29 | import rhodecode |
@@ -44,8 +43,10 b' class HooksHttpHandler(BaseHTTPRequestHa' | |||
|
44 | 43 | try: |
|
45 | 44 | result = self._call_hook(method, extras) |
|
46 | 45 | except Exception as e: |
|
46 | exc_tb = traceback.format_exc() | |
|
47 | 47 | result = { |
|
48 | 48 | 'exception': e.__class__.__name__, |
|
49 | 'exception_traceback': exc_tb, | |
|
49 | 50 | 'exception_args': e.args |
|
50 | 51 | } |
|
51 | 52 | self._write_response(result) |
@@ -214,12 +215,14 b' class Hooks(object):' | |||
|
214 | 215 | try: |
|
215 | 216 | result = hook(extras) |
|
216 | 217 | except Exception as error: |
|
218 | exc_tb = traceback.format_exc() | |
|
217 | 219 | log.exception('Exception when handling hook %s', hook) |
|
218 | 220 | error_args = error.args |
|
219 | 221 | return { |
|
220 | 222 | 'status': 128, |
|
221 | 223 | 'output': '', |
|
222 | 224 | 'exception': type(error).__name__, |
|
225 | 'exception_traceback': exc_tb, | |
|
223 | 226 | 'exception_args': error_args, |
|
224 | 227 | } |
|
225 | 228 | finally: |
General Comments 0
You need to be logged in to leave comments.
Login now