failure.unknown_mapping
Mapping names a condition the operation does not have.
Area 4, Failures; not declinable; the next step is usually the agent's.
A construction's arms are the rules of its type:
type Quantity = Int { min: 1 max: 1000}type QuantityTooLarge = Failure { kind: FailureKind.invalid_value}function doubled(quantity: Quantity) fails QuantityTooLarge -> Quantity { var result: Quantity = attempt Quantity(quantity * 2) { maximum: QuantityTooLarge } return result}
error Quantity(...) has no maximum: condition to map
--> main.jadpo:12:9
|12 | maximum: QuantityTooLarge | ^^^^^^^ not a condition here
- reason
- A construction's arms are the rules of its type and the types it builds on;
Quantity(...)'s areminandmax, andinvalid:covers any without an arm of its own. - next
- Remove
maximum: ..., or map one ofminandmaxinstead (agent) - rule
- failure.
unknown_ mapping - help
- https://jadpo.
dev/docs/errors/failure. unknown_ mapping
Markdown for agents: /docs/errors/failure.unknown_mapping.md.Built from Jadpo main at aee2e8f.