code: def write_error(self, status_code, **kwargs):
          
          super(BaseHandler, self).write_error(status_code, **kwargs)
docs: Override to implement custom error pages.
          http://tornado.readthedocs.org/en/stable/_modules/tornado/web.html#RequestHandler.write_error