RX0297

Domain: Execution

Error message

%s was delivered a different count of operands than its body reads (%s)

In the message, %s marks a value that the engine fills in when it raises the error.

The story

This message is about a mismatch inside the engine, and it is worth understanding even if you did not cause it. When you call a builtin, rush delivers a certain number of operands to its body, based on the parameters that the builtin declares. Normally the number the body expects and the number delivered match perfectly, and the body just reads them in order. This error means they did not match. The body went to read an operand at some position, and nothing was there, or there was a different count than it was built for. Instead of reading beyond what was delivered, which could mean reading garbage, rush stops on the spot. The second slot of the message shows the exact count test that failed. In everyday terms, imagine a recipe that says take three eggs, and the cook is handed two. A good cook stops and says something is off. If you see this, it points at a defect in the builtin's declaration or body, not in your script. Report it with the message, and it can be fixed at the source.

Text from the Rush engine's error catalogue.