Add the exception's message to the traceback
This commit is contained in:
parent
6007789480
commit
7ef3be5842
1 changed files with 3 additions and 2 deletions
|
@ -44,8 +44,9 @@ def _run(get_producer, queues, chunk_size, args):
|
|||
while True:
|
||||
try:
|
||||
data = producer(chunk_size) or None
|
||||
except Exception:
|
||||
data = Exception("".join(traceback.format_exception(*sys.exc_info())))
|
||||
except Exception as ex:
|
||||
message = '%s\n%s' % (ex.message, "".join(traceback.format_exception(*sys.exc_info())))
|
||||
data = Exception(message)
|
||||
|
||||
for queue in queues:
|
||||
try:
|
||||
|
|
Reference in a new issue