| 400 | |
| 401 | |
| 402 | class ChainedExceptionHandler(BaseExceptionHandler): |
| 403 | def __init__(self, exception_handlers): |
| 404 | self._exception_handlers = exception_handlers |
| 405 | |
| 406 | def inject_handler(self, position, handler): |
| 407 | self._exception_handlers.insert(position, handler) |
| 408 | |
| 409 | def handle_exception(self, exception, stdout, stderr, **kwargs): |
| 410 | for handler in self._exception_handlers: |
| 411 | return_value = handler.handle_exception( |
| 412 | exception, stdout, stderr, **kwargs |
| 413 | ) |
| 414 | if return_value is not None: |
| 415 | return return_value |
no outgoing calls
no test coverage detected