error handling

This commit is contained in:
2022-06-03 12:39:14 +02:00
parent 88d5ac6ad7
commit 895439cbc9
4 changed files with 70 additions and 5 deletions

26
sample/handle.pl.xml Normal file
View File

@@ -0,0 +1,26 @@
<program name="handle">
<main>
<handle>
<try>
<integer value="non" />
<call function="print-line">
<arguments>
<string value="there is no bug" />
</arguments>
</call>
</try>
<catch variable="err">
<call function="print-line">
<arguments>
<string value="oh no there is a bug" />
</arguments>
</call>
<call function="print-line">
<arguments>
<value variable="err" />
</arguments>
</call>
</catch>
</handle>
</main>
</program>