Skip to content

Error Handling

Nika Natsvlishvili edited this page Dec 29, 2025 · 1 revision

🛡️ Error-Handling.md

The Vigil

Handling runtime errors (exceptions) is done via a Vigil. Code that might fail is placed inside the vigil block.

Confession

If an error occurs ("a sin"), it is caught in the confess block.

vigil {
    inscribe x = 100 / 0; // This causes a DivisionByZero error
} confess sin {
    proclaim "We have sinned:";
    proclaim sin; // Prints the error message
} amen

Clone this wiki locally