diff --git a/IPython/core/shellapp.py b/IPython/core/shellapp.py index 685b145..adb9b40 100644 --- a/IPython/core/shellapp.py +++ b/IPython/core/shellapp.py @@ -143,7 +143,7 @@ class InteractiveShellApp(Configurable): reraise_ipython_extension_failures = Bool( False, config=True, - help="If True, exit on failure to load any extensions.", + help="Reraise exceptions encountered loading IPython extensions?", ) # Extensions that are always loaded (not configurable) @@ -265,7 +265,7 @@ class InteractiveShellApp(Configurable): self.log.info("Loading IPython extension: %s" % ext) self.shell.extension_manager.load_extension(ext) except: - if self.exit_on_extension_load_failure: + if self.reraise_ipython_extension_failures: raise msg = ("Error in loading extension: {ext}\n" "Check your config files in {location}".format( @@ -274,7 +274,7 @@ class InteractiveShellApp(Configurable): )) self.log.warn(msg, exc_info=True) except: - if self.exit_on_extension_load_failure: + if self.reraise_ipython_extension_failures: raise self.log.warn("Unknown error in loading extensions:", exc_info=True) diff --git a/IPython/html/notebookapp.py b/IPython/html/notebookapp.py index eca47c4..16708c0 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)