Do not refer spawner on fatal errors

This commit is contained in:
Daisuke Taniwaki
2018-06-07 14:46:31 +09:00
parent 5d9122b26c
commit 925ee1dfb2
2 changed files with 7 additions and 2 deletions

View File

@@ -842,7 +842,12 @@ class BaseHandler(RequestHandler):
html = self.render_template('%s.html' % status_code, **ns)
except TemplateNotFound:
self.log.debug("No template for %d", status_code)
html = self.render_template('error.html', **ns)
try:
html = self.render_template('error.html', **ns)
except:
# In this case, any side effect must be avoided.
ns['no_spawner_check'] = True
html = self.render_template('error.html', **ns)
self.write(html)