exception
Source: /avail/Avail/Foundation/Exceptions
Categories: Exception Handling, Control Structures
Raise the specified exception. The virtual machine scans the current fiber 's chain of continuation s to identify an invocation of Guard|guard_«intercept_»«ensure_» (primitive 200). Extract the second argument from that continuation. This is a tuple of arity-one exception handling function. If any of these handlers, from left to right, accepts anException, then discard all continuations after this one and then invoke the handler with anException. If none of these handlers accept the argument, then the virtual machine continues scanning the chain of continuations for correctly typed exception handling functions. If no suitable exception handling function is found, then invoke the current fiber's
_'s⁇unhandled exception handler is_
. Crash:_
the current fiber if no such handler exists.
Position | Name | Type | Description | |
---|---|---|---|---|
Parameters | ||||
1 | anException | exception | ||
Returns | ⊥ |