def handle_error(self):
        """
        Handles an error log record that should be shown

        Returns:
            None
        """
        if not self.tasks:
            return

        # All the parents inherit the failure
        self.mark_parent_tasks_as_failed(
            self.cur_task,
            flush_logs=True,
        )

        # Show the start headers for all the parent tasks if they were not
        # shown by the depth level limit
        for index, task in enumerate(self.tasks.values()):
            if self.should_show_by_depth(index + 1):
                continue

            start_task_header = logging.LogRecord(
                '', logging.INFO, '', 0, '', [], None
            )
            start_task_header.msg = ColorFormatter.colored(
                'default',
                START_TASK_MSG,
            )
            start_task_header.task = task.name
            self.pretty_emit(
                start_task_header,
                is_header=True,
                task_level=index + 1,
            )

        # Show now all the cached logs for the current task
        for old_record in self.tasks[self.cur_task]:
            self.pretty_emit(old_record)

        self.tasks[self.cur_task].clear()
Handles an error log record that should be shown

        Returns:
            None