def _runner(plugin_context=plugin_context): with plugin_context: try: plugin_context.loop() except Exception as exc: print_error(exc, traceback.format_exc(), context=plugin_context)
def _runner(plugin_context=plugin_context): try: plugin_context.start() plugin_context.loop() plugin_context.stop() except Exception as exc: print_error(exc, traceback.format_exc(), prefix='Error in plugin context', context=plugin_context)
def _runner(node_context=node_context): try: node_context.start() except Exception as exc: print_error(exc, traceback.format_exc(), context=node_context, method='start') node_context.input.on_end() else: node_context.loop() try: node_context.stop() except Exception as exc: print_error(exc, traceback.format_exc(), context=node_context, method='stop')
def _runner(node_context=node_context): try: node_context.start() except Exception as exc: print_error(exc, traceback.format_exc(), prefix='Could not start node context', context=node_context) node_context.input.on_end() else: node_context.loop() try: node_context.stop() except Exception as exc: print_error(exc, traceback.format_exc(), prefix='Could not stop node context', context=node_context)
def handle_error(self, exc, trace): return print_error(exc, trace, context=self.wrapped)