def METHOD_NAME(self, exc, task_id, args, kwargs, einfo):
    super().METHOD_NAME(exc, task_id, args, kwargs, einfo=einfo)
    if not self._result:
        self._result = TaskResult(status=TaskResultStatus.ERROR, messages=[str(exc)])
    if not self._result.uid:
        self._result.uid = self._uid
    TaskInfo(
        task_name=self.__name__,
        task_description=self.__doc__,
        start_timestamp=self.start or default_timer(),
        finish_timestamp=default_timer(),
        finish_time=datetime.now(),
        result=self._result,
        task_call_module=self.__module__,
        task_call_func=self.__name__,
        task_call_args=args,
        task_call_kwargs=kwargs,
    ).save(self.result_timeout_hours)
    Event.new(
        EventAction.SYSTEM_TASK_EXCEPTION,
        message=f"Task {self.__name__} encountered an error: {exception_to_string(exc)}",
    ).save()