Skip to content

Commit 49a4c73

Browse files
committed
Merge pull request #1418 from minrk/nbconvert-exception
log exceptions in nbconvert handlers
2 parents 17af0c3 + 6805cab commit 49a4c73

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

notebook/nbconvert/handlers.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import zipfile
99

1010
from tornado import web, escape
11+
from tornado.log import app_log
1112

1213
from ..base.handlers import (
1314
IPythonHandler, FilesRedirectHandler,
@@ -70,6 +71,7 @@ def get_exporter(format, **kwargs):
7071
try:
7172
return Exporter(**kwargs)
7273
except Exception as e:
74+
app_log.exception("Could not construct Exporter: %s", Exporter)
7375
raise web.HTTPError(500, "Could not construct Exporter: %s" % e)
7476

7577
class NbconvertFileHandler(IPythonHandler):
@@ -103,6 +105,7 @@ def get(self, format, path):
103105
}
104106
)
105107
except Exception as e:
108+
self.log.exception("nbconvert failed: %s", e)
106109
raise web.HTTPError(500, "nbconvert failed: %s" % e)
107110

108111
if respond_zip(self, name, output, resources):

0 commit comments

Comments
 (0)