Skip to content
Snippets Groups Projects
Commit 40bb66d1 authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

catch errors that could appear when running plugins gui extention points

parent b2a90101
No related branches found
No related tags found
No related merge requests found
......@@ -255,7 +255,11 @@ class PluginManager(object):
if gui_extpoint_name in self.gui_extension_points_handlers:
for handlers in self.gui_extension_points_handlers[
gui_extpoint_name]:
handlers[0](*args)
try:
handlers[0](*args)
except Exception, e:
log.warning('Error executing %s', handlers[0],
exc_info=True)
def _register_events_handlers_in_ged(self, plugin):
for event_name, handler in plugin.events_handlers.iteritems():
......@@ -326,7 +330,11 @@ class PluginManager(object):
gui_extpoint_name]:
handler = gui_extpoint_handlers[1]
if handler:
handler(*gui_extension_point_args)
try:
handler(*gui_extension_point_args)
except Exception, e:
log.warning('Error executing %s', handler,
exc_info=True)
self._remove_events_handler_from_ged(plugin)
self._remove_network_events_from_nec(plugin)
......@@ -357,7 +365,12 @@ class PluginManager(object):
gui_extpoint_name]:
handler = gui_extpoint_handlers[0]
if handler:
handler(*gui_extension_point_args)
try:
handler(*gui_extension_point_args)
except Exception, e:
log.warning('Error executing %s', handler,
exc_info=True)
@log_calls('PluginManager')
def _activate_all_plugins(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment