Mercurial > code > home > repos > light9
view lib/cycloneerr.py @ 1488:df6bfc7e5584
disable origin dragger for a bit of performance, and it should be gone anyway since selecting all other pts should be super easy
Ignore-this: dd102507c948cbf2cf3dada2286da968
author | drewp@bigasterisk.com |
---|---|
date | Mon, 13 Jun 2016 08:39:36 +0000 |
parents | 473db8bebb8f |
children |
line wrap: on
line source
import httplib, cgi class PrettyErrorHandler(object): """ mix-in to improve cyclone.web.RequestHandler """ def get_error_html(self, status_code, **kwargs): try: tb = kwargs['exception'].getTraceback() except AttributeError: tb = "" return "<html><title>%(code)d: %(message)s</title>" \ "<body>%(code)d: %(message)s<pre>%(tb)s</pre></body></html>" % { "code": status_code, "message": httplib.responses[status_code], "tb" : cgi.escape(tb), }