#NEWLINE# def with_error( self , prev_error ) : #NEWLINE# #INDENT# "Sets the previous error and returns self.\n\n        When re-throwing a TaskFailed, you can provide a new,\n        more high level failure description and pass along the\n        previously failed tasks to still be able to reconstruct\n        the full history of failed tasks.\n\n        Examples:\n            Re-throw a TaskFailed with a new, more high level description.\n\n            >>> try:\n            ...     raise TaskFailed('Low level', {'some': 1}, 'args')\n            ... except TaskFailed as prev_err:\n            ...     raise TaskFailed('High level').with_error(prev_err)\n\n        Returns:\n            TaskFailed\n        " #NEWLINE# self . prev_error = prev_error #NEWLINE# return self