def continue_with(self, func):
        try:
            response = func()
        except __HOLE__ as exception:
            if self.parent:
                self.parent.on_success(exception.args)
        except BaseException as exception:
            if isinstance(exception, TaskFailed):
                exception.tasktrace.append(self)
            if self.parent:
                self.parent.on_error(exception)
            else:
                raise
        else:
            self.register(response)
dataset/ETHPy150Open SpockBotMC/SpockBot/spockbot/plugins/tools/task.py/Task.continue_with