From 1718073eb723a4245d1a5ebdc8ddca914dd893dc Mon Sep 17 00:00:00 2001 From: Yu-Jie Lin Date: Thu, 25 Feb 2016 14:36:54 +0800 Subject: [PATCH] Do not quit autoreload with debug on if exception Also print out traceback to help debugging. --- pelican/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pelican/__init__.py b/pelican/__init__.py index 30b3c2f8..b3a6f136 100644 --- a/pelican/__init__.py +++ b/pelican/__init__.py @@ -469,7 +469,8 @@ def main(): except Exception as e: if (args.verbosity == logging.DEBUG): - raise + logger.error( + 'Exception occurred: %s', e, exc_info=True) logger.warning( 'Caught exception "%s". Reloading.', e)