RX0078

Domain: Execution

Error message

%s cannot be selected by %s

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

The story

You selected a member using a bracket, and the value inside the bracket did not name anything. Let's recap how bracket selection works. The value inside the bracket is the name. On a list, a whole number is a position, counting from one. On a map, a text is a label. And two numbers with two dots between them make a range. Now, which values cannot name a member? A truth value. A whole collection. A fractional number, or a negative one. And mixing kinds: a number used against a map, or a text used against a list. A list has no labels, and a map has no positions, so those do not fit. The engine refuses and shows what you selected from and what you selected with. Note one difference: a lawful position that is just beyond the end answers null. That is absence. But an unlawful name is a mistake, and it is refused. Use a whole number on a list, a label on a map, and everything fits.

Text from the Rush engine's error catalogue.