aboutsummaryrefslogtreecommitdiff
path: root/docs/ERRORS.md
diff options
context:
space:
mode:
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)
```