From: Ira W. Snyder Date: Sun, 9 Nov 2008 20:04:23 +0000 (-0800) Subject: Print a traceback on unknown exceptions X-Git-Tag: v2.1.0~1 X-Git-Url: https://www.irasnyder.com/gitweb/?a=commitdiff_plain;h=0db7e8102731bec67c48426d85c43981aba431aa;p=rarslave2.git Print a traceback on unknown exceptions Unknown exceptions were already handled by the code, but they would not lead to a traceback, making errors harder to find. Now we add a traceback to the log to help in tracking them down. Signed-off-by: Ira W. Snyder --- diff --git a/rarslave.py b/rarslave.py index 1a7e4bc..5d9824d 100755 --- a/rarslave.py +++ b/rarslave.py @@ -323,8 +323,12 @@ def runDirectory(directory, files, options): for cs in sets: try: runEachType(cs, options) - except: + except Exception, e: + import traceback logging.error('Unknown Exception: %s' % cs.parityFile) + logging.error('===== BEGIN Bactrace =====') + [logging.error(l) for l in traceback.format_exc(e).split('\n')] + logging.error('===== END Bactrace =====') ################################################################################