From 69cb4b782ab493af267d369f62829bf062b13401 Mon Sep 17 00:00:00 2001 From: Nathanne Isip Date: Sat, 21 Sep 2024 08:30:25 +0800 Subject: [PATCH] Error handling test script snippet file. --- test/error_handling.zhv | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 test/error_handling.zhv diff --git a/test/error_handling.zhv b/test/error_handling.zhv new file mode 100644 index 0000000..5a1f8c5 --- /dev/null +++ b/test/error_handling.zhv @@ -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."; +};