def on_exception(self, state: RunnerState): exception = state.exception if not utils.is_exception(exception): return if state.need_reraise_exception: raise exception
def on_exception(self, state: RunnerState): exception = state.exception if not utils.is_exception(exception): return if isinstance(exception, KeyboardInterrupt): self.tqdm.write("Early exiting") state.need_reraise_exception = False
def on_exception(self, state: RunnerState): """Notify about raised Exception""" if self.log_on_exception: exception = state.exception if utils.is_exception(exception) and not isinstance( exception, KeyboardInterrupt): text = (f"`{type(exception).__name__}` exception was raised:\n" f"{exception}") self._send_text(text)