chiark / gitweb /
tracebacks
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 1 Apr 2017 13:45:30 +0000 (14:45 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 1 Apr 2017 13:45:30 +0000 (14:45 +0100)
server

diff --git a/server b/server
index 68f8541..0d75e0b 100755 (executable)
--- a/server
+++ b/server
@@ -12,6 +12,8 @@ from twisted.web.server import NOT_DONE_YET
 
 import syslog
 
+import traceback
+
 clients = { }
 
 #---------- "router" ----------
@@ -174,7 +176,7 @@ class IphttpResource(twisted.web.resource.Resource):
     desca = {'d': None}
     try: process_request(request, desca)
     except Exception as e:
-      emsg = repr(e)
+      emsg = traceback.format_exc()
       log_http(desca, 'EXCEPTION ' + emsg)
       request.setHeader('Content-Type','text/plain; charset="utf-8"')
       request.setResponseCode(400)