RX0044

Domain: Execution

Error message

the collection at %s would be empty, and an empty bag is not a bag (%s)

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

The story

You tried to create a collection with nothing in it, and the engine said: an empty bag is not a bag. This is a deliberate rule. If you have nothing to put in your bag, you do not need a bag. In rush, a collection is born with its first member, never before. There is no state called empty and waiting. So a bare pair of brackets, or an add with no value behind the name, is refused. What if you still want rules for that collection, say it should only hold numbers? You can attach those rules to the name, and they will be applied at the exact moment the first member arrives. You never need to build a hollow container first. Example: instead of making an empty list and then filling it, write the list with its first item. The message tells you the site that tried, either the literal text or the door and the name. Put in the first member, and the collection is born. Simple, tidy, and no hollow containers.

Text from the Rush engine's error catalogue.