aboutsummaryrefslogtreecommitdiff
path: root/docs/ERRORS.md
diff options
context:
space:
mode:
authorJJ2024-05-10 01:18:15 +0000
committerJJ2024-05-10 04:42:32 +0000
commitd3c91164aff6a620348c81776fdae37fa41b81c3 (patch)
treeee52f6ff9fc5ec654618ec00a111ad0b4658b32c /docs/ERRORS.md
parent073c902a31936c2b53d89245662fb272c9670169 (diff)
docs: update for previous commit accordingly
Diffstat (limited to 'docs/ERRORS.md')
-rw-r--r--docs/ERRORS.md8
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/ERRORS.md b/docs/ERRORS.md
index 33c15d5..cce29c1 100644
--- a/docs/ERRORS.md
+++ b/docs/ERRORS.md
@@ -46,11 +46,11 @@ If an exception is not handled within a function body, the function must be expl
Despite functioning here as exceptions: errors remain types. An error thrown from an unwrapped `Result[T, E]` is of type `E`. `catch` statements, then, may pattern match upon possible errors, behaving similarly to `of` branches.
```puck
-try:
+try
...
-catch "Error":
+catch "Error" then
...
-finally:
+finally
...
```
@@ -65,7 +65,7 @@ This can make it difficult to do monadic error handling elegantly: one could ret
```puck
pub func set[T](self: list[T], i: uint, val: T) =
- if i > self.length:
+ if i > self.length then
raise IndexOutOfBounds
self.data.raw_set(offset = i, val)
```