Skip to main content

Fail node

Fail node representation

The fail node is used for directing the control flow of execution by throwing a failure. Once selected, it will immediately switch to a running state and then transition to a failure state, creating an execution failure.

Properties

PropertyDescription
Child semanticsCan only be leaf node, cannot have any children.
Parametersname: name of the node
failure_message: the error message to produce upon failure
Success criterionnone - never succeeds
Failure criterionalways - immediately fails

Python API

The node can be constructed by parameterizing it on creation with the expected error message for the induced failure.

BT.Fail(failure_message="Fail to trigger retry node")