Mercurial > code > home > repos > light9
view lib/cycloneerr.py @ 1073:52f049d85f96
less CC crashing. curve points are stored in their own n3 files. fix curve row height edge cases.
Ignore-this: 7bd8e0c82d4106d53c24d67b981baf60
author | Drew Perttula <drewp@bigasterisk.com> |
---|---|
date | Tue, 03 Jun 2014 05:09:41 +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), }