def aborted(self, exc_info): """ Called by a logger to log an exception. """ self.exc_info = exc_info self.did_end = True self.write(format_exception(*self.exc_info))
def _on_job_error(self, job, exc_info): msg = "{}: {} error: {}".format(self.task.name, job.name, str(exc_info[1])) trace = "".join(format_exception(*exc_info)) self._print("errors", msg) if _is_recoverable_error(exc_info[0]): self._print("tracebacks", trace) else: self._print("fatal_errors", trace)
def get_error(self, include_tb=True): if self.exc_info is None: return None if include_tb: return format_exception(*self.exc_info) if str(self.exc_info[1]): return str(self.exc_info[1]) return self.exc_info[0].__name__
def _on_job_error(self, job, exc_info): msg = "{}: {} error: {}".format(self.task.name, job.name, str(exc_info[1])) trace = ''.join(format_exception(*exc_info)) self._print('errors', msg) if _is_recoverable_error(exc_info[0]): self._print('tracebacks', trace) else: self._print('fatal_errors', trace)
def aborted(self, exc_info): self.exc_info = exc_info self.did_end = True self.write('ERROR:', str(exc_info[1]), '\n') self._write_error(format_exception(*self.exc_info))