failure.attempt_infallible
Attempt is used on something that cannot fail.
Area 3, Logic; not declinable; the next step is usually the agent's.
type Count = Int {}function plain(n: Count) -> Count { return n}function wrapper(n: Count) -> Count { return attempt plain(n)}
error plain(...) can't fail, so it takes no attempt
--> main.jadpo:8:12
|8 | return attempt plain(n) | ^^^^^^^ nothing to pass on
- reason
plain(...)lists no failures afterfails, so it always gives its result;attemptmarks only calls that can fail.- next
- Remove
attempt(agent) - rule
- failure.
attempt_ infallible - help
- https://jadpo.
dev/docs/errors/failure. attempt_ infallible
The outcome-match examples below share a hidden file declaring
lookup(key: LookupKey) fails LookupMissing, LookupRefused -> LookupResult.
Markdown for agents: /docs/errors/failure.attempt_infallible.md.Built from Jadpo main at aee2e8f.