From 7ef3be5842b75f7dc0e1462ebf4405770f030467 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Wed, 8 Oct 2014 14:20:57 -0400 Subject: [PATCH] Add the exception's message to the traceback --- util/queueprocess.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/util/queueprocess.py b/util/queueprocess.py index d22ade4f0..d8e00418f 100644 --- a/util/queueprocess.py +++ b/util/queueprocess.py @@ -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: