def set_spawn_error_hook(self, _on_error_method, *args, **kwargs):
        self._on_error_method = _on_error_method
        self._on_error_args = args
        self._on_error_kwargs = kwargs
Create a hook to handle exceptions when spawning a task.
dataset/ETHPy150Open openstack/ironic/ironic/conductor/task_manager.py/TaskManager.set_spawn_error_hook