(self, prev_error)
return self
Sets the previous error and returns self.

        When re-throwing a TaskFailed, you can provide a new,
        more high level failure description and pass along the
        previously failed tasks to still be able to reconstruct
        the full history of failed tasks.

        Examples:
            Re-throw a TaskFailed with a new, more high level description.

            >>> try:
            ...     raise TaskFailed('Low level', {'some': 1}, 'args')
            ... except TaskFailed as prev_err:
            ...     raise TaskFailed('High level').with_error(prev_err)

        Returns:
            TaskFailed
Sets the previous error and returns self.
Sets the previous error and returns self .
def with_error(self, prev_error):
        """Sets the previous error and returns self.

        When re-throwing a TaskFailed, you can provide a new,
        more high level failure description and pass along the
        previously failed tasks to still be able to reconstruct
        the full history of failed tasks.

        Examples:
            Re-throw a TaskFailed with a new, more high level description.

            >>> try:
            ...     raise TaskFailed('Low level', {'some': 1}, 'args')
            ... except TaskFailed as prev_err:
            ...     raise TaskFailed('High level').with_error(prev_err)

        Returns:
            TaskFailed
        """
        self.prev_error = prev_error
        return self
def with_error ( self , prev_error ) : self . prev_error = prev_error return self