

def _handle_failure(self, on_failure, error):
    'Handles the situation where a resource failed to succeed.\n\n        :param callable on_failure: What should be done when the resource\n                                    failed?\n        :param str error: Error message.\n\n        If `on_failure` is ``None``, nothing is done when the resource failed.\n        Otherwise, it is called with `error`. If the returned value is an\n        exception, it is raised.\n        '
    if (self is not None):
        obj = on_failure(error)
        if isinstance(obj, Exception):
            raise obj

dataset/ETHPy150Open s3rvac/retdec-python/retdec/resource.py Resource._handle_failure/VarMisuse@18/167 `on_failure`->`self`