-
Notifications
You must be signed in to change notification settings - Fork 0
Error Handling
Nika Natsvlishvili edited this page Dec 29, 2025
·
1 revision
Handling runtime errors (exceptions) is done via a Vigil. Code that might fail is placed inside the vigil block.
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