RX0041

Domain: Execution

Error message

the expression at %s produced no value, and %s needs one

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

The story

You asked for a value, and what you handed over never produced one. Let's look at the two shapes of this mistake. In the first, a verb takes an operand, and that operand turns out to produce nothing. In the second, you bind a name to the result of a call, and the call never reaches an answer. For instance, x equals f, where f never answers. There is nothing to put into x. Now, the engine could have written an empty string and moved on. It deliberately does not. An empty string would be a value nobody computed, and every later read of x would treat a fiction as a fact. This engine has a consistent rule: a refusal is not a result, and it is never recorded as an empty one. The message names two things: where the expression is, and which site needed the value, so you know exactly which line to look at. The fix is to make sure the thing you call actually answers, or to stop using its result. Give the site a real value, and the program moves on honestly.

Text from the Rush engine's error catalogue.