# HG changeset patch # User Mads Kiilerich # Date 2011-02-20 23:52:23 # Node ID 8fa83d7159eb071b2a3aa04ff901977bf69e08fa # Parent bb107a31820e0c1a22a74126f4984c4e12461c38 serve: catch and log all Exceptions, not only StandardException Other exceptions than StandardExceptions were left to the default error handler which was muted when running in daemon mode. Now all Exceptions are handled and logged to the log file. diff --git a/mercurial/hgweb/server.py b/mercurial/hgweb/server.py --- a/mercurial/hgweb/server.py +++ b/mercurial/hgweb/server.py @@ -68,7 +68,7 @@ class _httprequesthandler(BaseHTTPServer def do_POST(self): try: self.do_write() - except StandardError: + except Exception: self._start_response("500 Internal Server Error", []) self._write("Internal Server Error") tb = "".join(traceback.format_exception(*sys.exc_info()))