Browse Source

server: Also print the traceback when something bad happen

main
Benoit Allard 13 years ago
parent
commit
68514b19b3
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      hyde/server.py

+ 4
- 0
hyde/server.py View File

@@ -8,6 +8,7 @@ import select
import threading import threading
import urlparse import urlparse
import urllib import urllib
import traceback
from datetime import datetime from datetime import datetime
from SimpleHTTPServer import SimpleHTTPRequestHandler from SimpleHTTPServer import SimpleHTTPRequestHandler
from BaseHTTPServer import HTTPServer from BaseHTTPServer import HTTPServer
@@ -196,6 +197,7 @@ class HydeWebServer(HTTPServer):
except Exception, exception: except Exception, exception:
logger.error('Error occured when regenerating the site [%s]' logger.error('Error occured when regenerating the site [%s]'
% exception.message) % exception.message)
logger.error(traceback.format_exc())


def generate_node(self, node): def generate_node(self, node):
""" """
@@ -213,6 +215,7 @@ class HydeWebServer(HTTPServer):
logger.error( logger.error(
'Error [%s] occured when generating the node [%s]' 'Error [%s] occured when generating the node [%s]'
% (repr(exception), node)) % (repr(exception), node))
logger.error(traceback.format_exc())


def generate_resource(self, resource): def generate_resource(self, resource):
""" """
@@ -231,3 +234,4 @@ class HydeWebServer(HTTPServer):
logger.error( logger.error(
'Error [%s] occured when serving the resource [%s]' 'Error [%s] occured when serving the resource [%s]'
% (repr(exception), resource)) % (repr(exception), resource))
logger.error(traceback.format_exc())

Loading…
Cancel
Save