spread-error

xod/core/spread-error

If at least one of the inputs has an error the node raises an error on all outputs. If there are no errors the node passes input values through without changes.
spread-error
@/spread-error
If at least one of the inputs has an error the node raises an error on all outputs. If there are no errors the node passes input values through without changes.
Ageneric t1
Bgeneric t2
spread-error
A
B
A'
B'
B'generic t2
A'generic t1

C++ implementation

#pragma XOD error_raise enable

node {
    void evaluate(Context ctx) {
        if (getError<input_A>(ctx) || getError<input_B>(ctx)) {
            raiseError(ctx);
            return;
        }

        emitValue<output_AU0027>(ctx, getValue<input_A>(ctx));
        emitValue<output_BU0027>(ctx, getValue<input_B>(ctx));
    }
}