From 34ee51bf8487e889e910f15a0c2ecf9b4503193f Mon Sep 17 00:00:00 2001 From: John Donaldson Date: Wed, 12 Jun 2019 18:59:33 +0100 Subject: [PATCH] Add better logging for raised exceptions --- devel/devel-server.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/devel/devel-server.py b/devel/devel-server.py index f81c0cc..3bc2e29 100755 --- a/devel/devel-server.py +++ b/devel/devel-server.py @@ -150,7 +150,8 @@ class MothRequestHandler(http.server.SimpleHTTPRequestHandler): try: catdir = self.server.args["puzzles_dir"].joinpath(category) mb = mothballer.package(category, catdir, self.seed) - except: + except Exception as ex: + logger.exception(ex) self.send_response(200) self.send_header("Content-Type", "text/html; charset=\"utf-8\"") self.end_headers()