From 7a1b8d7dffb7d41ae80722be6976160f094ac1fb Mon Sep 17 00:00:00 2001 From: Scott Sanderson Date: Mon, 16 Feb 2015 18:14:42 -0500 Subject: [PATCH] DEV: Add re-raise toggle for server extensions. Also renames toggles to "reraise_*_extension_failures". --- IPython/html/notebookapp.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/IPython/html/notebookapp.py b/IPython/html/notebookapp.py index eca47c488..16708c078 100644 --- a/IPython/html/notebookapp.py +++ b/IPython/html/notebookapp.py @@ -751,6 +751,12 @@ class NotebookApp(BaseIPythonApplication): "This is an experimental API, and may change in future releases.") ) + reraise_server_extension_failures = Bool( + False, + config=True, + help="Reraise exceptions encountered loading server extensions?", + ) + def parse_command_line(self, argv=None): super(NotebookApp, self).parse_command_line(argv) @@ -984,6 +990,8 @@ class NotebookApp(BaseIPythonApplication): if func is not None: func(self) except Exception: + if self.reraise_server_extension_failures: + raise self.log.warn("Error loading server extension %s", modulename, exc_info=True)