error

xod/core/error

Raises an error when the `ERR` input pin receives the `True` value. Otherwise, the node passes the value from the `IN` pin to the `OUT` pin.
error
@/error
Raises an error when the `ERR` input pin receives the `True` value. Otherwise, the node passes the value from the `IN` pin to the `OUT` pin.
INgeneric t1
A value to pass through the node.
ERRboolean
The node raises an error on the `True` value.
error
OUT
IN
ERR
OUTgeneric t1
The value passed through the node.

C++ implementation

#pragma XOD error_raise enable

node {
    void evaluate(Context ctx) {
        if (getValue<input_ERR>(ctx)) {
            raiseError<output_OUT>(ctx);
        } else {
            emitValue<output_OUT>(ctx, getValue<input_IN>(ctx));
        }
    }
}