Skip to content
This repository was archived by the owner on Apr 25, 2025. It is now read-only.

Rethrow/br_on_exn traps when given nullref #97

Merged
merged 2 commits into from
Jan 10, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions proposals/Exceptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,8 @@ Note that a caught exception can be rethrown using the `rethrow` instruction.
The `rethrow` instruction takes the exception associated with the `exnref` on
top of the stack, and rethrows the exception. A rethrow has the same effect as a
throw, other than an exception is not created. Rather, the referenced exception
on top of the stack is popped and then thrown.
on top of the stack is popped and then thrown. The `rethrow` instruction traps
if the value on the top of the stack is null.

### Exception data extraction

Expand Down Expand Up @@ -271,7 +272,8 @@ end $end
```

If the query fails, the control flow falls through, and no values are pushed
onto the stack.
onto the stack. The `br_on_exn` instruction traps if the value on the top of the
stack is null.

### Stack traces

Expand Down