syntax.unsupported_throw
Failure raised with throw or raise.
Area 3, Logic; not declinable; the next step is usually the agent's.
type Note = Text {}type NoteRejected = Failure { kind: FailureKind.rejected}function checked_note(note: Note) fails NoteRejected -> Note { if (note == "") { throw NoteRejected } return note}
error Jadpo writes reject, not throw
--> main.jadpo:9:9
|9 | throw NoteRejected | ^^^^^ write `reject`
- reason
throwraises an error in JavaScript, Java, C#, Kotlin and Swift, andraisein Python and Ruby; a Jadpo callable raises one of its declared failures withreject, and lists it infails.- next
- Use
rejectinstead ofthrow(agent) - rule
- syntax.
unsupported_ throw - help
- https://jadpo.
dev/docs/errors/syntax. unsupported_ throw
Markdown for agents: /docs/errors/syntax.unsupported_throw.md.Built from Jadpo main at aee2e8f.