RX0007

Domain: Engine

Error message

parameter %s declared type %s refused the value given

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

The story

Picture this. You add seven and the word banana, and the old engine answered seven, with a green light and exit code zero. A wrong answer that claims success. That is the worst kind of failure, because nothing after it can tell something went wrong. This refusal exists so that never happens again. Here is what the engine does now. Every parameter has a declared type, and that type is a little judge built when the engine was born. Before the builtin runs, before anything is wired, each argument goes in front of its judge. If the judge says no, the builtin never runs at all. The lines under this message tell the whole story: which parameter, which declared type, what the type requires, the exact value you gave, and why the judge refused. Plus is the one special case. It accepts text plus text, or number plus number. So when you write the letter a plus three, the two sides are different kinds, and the engine refuses on the second side, naming the kind the first side set. The fix: make both sides the same kind, convert one of them first. A loud no beats a quiet wrong answer.

Text from the Rush engine's error catalogue.