Skip to content

Commit

Permalink
Error handling test script snippet file.
Browse files Browse the repository at this point in the history
  • Loading branch information
nthnn committed Sep 21, 2024
1 parent c5218b3 commit 69cb4b7
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/error_handling.zhv
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/zhivo

catch {
render! "This is inside the handle-clause";
throw "A message";

render! "This won't be rendered";
}
handle err {
render! "Error caught: " + err;
}
then {
render! "End of catch-handle clause.";
};

0 comments on commit 69cb4b7

Please sign in to comment.