Jadpo is experimental and not ready for production. These docs follow the compiler's main branch as of 30 Oct 2026. What's built · Install 0.1.0
jadpo
Reference: Logic

Logic · rule

syntax.try_catch

Failure handled with try, catch or ?.

Area 3, Logic; not declinable; the next step is usually the agent's.

A call that can fail is marked where it is made: attempt passes its failures on, and a match on the call handles them. try { and catch have no edit, since what to do with each failure is the author's to say.

example
type Count = Int {    min: 0}type CountMissing = Failure {    kind: FailureKind.not_found}function counted_or_missing(count: Count) fails CountMissing -> Count {    if (count == 0) {        reject CountMissing    }    return count}function first(count: Count) fails CountMissing -> Count {    var result: Count = try counted_or_missing(count)    return result}
text
error: Jadpo writes `attempt`, not `try` --> main.jadpo:17:25   |17 |     var result: Count = try counted_or_missing(count)   |                         ^^^ write `attempt`  reason: `try` marks a call that can fail in Swift; Jadpo writes `attempt`, which passes the call's failures on to the caller.  next: Use `attempt` instead of `try` (agent)  rule: syntax.try_catch  help: https://jadpo.dev/docs/errors/syntax.try_catchcheck failed: 1 error, 1 file

Markdown for agents: /docs/errors/syntax.try_catch.md.Built from Jadpo main at a707efb.