From 68514b19b3a3723d62764a7e4f6d990cd0083dd3 Mon Sep 17 00:00:00 2001 From: Benoit Allard Date: Wed, 20 Jul 2011 23:02:06 +0200 Subject: [PATCH] server: Also print the traceback when something bad happen --- hyde/server.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hyde/server.py b/hyde/server.py index 4157424..5044e3c 100644 --- a/hyde/server.py +++ b/hyde/server.py @@ -8,6 +8,7 @@ import select import threading import urlparse import urllib +import traceback from datetime import datetime from SimpleHTTPServer import SimpleHTTPRequestHandler from BaseHTTPServer import HTTPServer @@ -196,6 +197,7 @@ class HydeWebServer(HTTPServer): except Exception, exception: logger.error('Error occured when regenerating the site [%s]' % exception.message) + logger.error(traceback.format_exc()) def generate_node(self, node): """ @@ -213,6 +215,7 @@ class HydeWebServer(HTTPServer): logger.error( 'Error [%s] occured when generating the node [%s]' % (repr(exception), node)) + logger.error(traceback.format_exc()) def generate_resource(self, resource): """ @@ -231,3 +234,4 @@ class HydeWebServer(HTTPServer): logger.error( 'Error [%s] occured when serving the resource [%s]' % (repr(exception), resource)) + logger.error(traceback.format_exc())