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.
OUTgeneric t1
The value passed through the node.
#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));
}
}
}