# Error


Error effect with contextual messages and multiple handler strategies.

## `collecting`

_error.collecting: handler that accumulates every error into state as a list of `{ message, context }` and resumes computation with null._

Collecting error handler: accumulates errors in state as a list.
Resumes computation with null so subsequent effects still execute.
Use when you want all errors, not just the first.

State shape: list of { message, context }

## `raise`

_raise: send an `error` effect carrying a message and empty context; the handler decides whether to throw, collect, or recover._

```
raise : string -> Computation a
```

Raise an error. Returns a Computation that sends an "error" effect.
The handler determines what happens: throw, collect, or recover.

## `raiseWith`

_raiseWith: raise an error with a context string; handlers can collect contexts to assemble stack-trace-style reports._

```
raiseWith : string -> string -> Computation a
```

Raise an error with context. The context string describes where
in the computation the error occurred, enabling stack-trace-like
error reports when used with the collecting handler.

## `result`

_error.result: handler that aborts with a tagged `{ _tag = "Error"; message; context; }` value; uses the non-resumption protocol._

Result error handler: aborts computation with tagged Error value.
Uses the non-resumption protocol to discard the continuation.

Returns `{ _tag = "Error"; message; context; }` on error.

## `strict`

_error.strict: handler that throws on the first error via `builtins.throw`, prefixing context when present; halts evaluation immediately._

Strict error handler: throws on first error via builtins.throw.
Use when errors should halt evaluation immediately.

Includes context in the thrown message when available.

