Skip to content
Ilha
Esc
↑↓navigate↵open⌘Jpreview

Errors and warnings

Every Ilha error and warning carries a stable ILHA code, a fix hint, and a docs link.

Ilha reports problems with a stable code. Each message follows one shape, so you and your tools can match on the code instead of the wording:

[ILHA001] <what went wrong>. Fix: <what to do> See https://ilha.build/errors/ILHA001

Errors are IlhaError instances. They expose code, fix, and docs:

import { class IlhaError
Error thrown by ilha with a stable `code`, a `fix` hint and a `docs` URL.
IlhaError
, const atom: AtomFnatom } from "ilha";
try { atom<number>(init: number | Atom<number>, options?: AtomOptions<number> | undefined): AtomHandle<number> (+1 overload)
An existing Effect atom, or a plain value. Store a function with `atom.lazy(() => fn)`; the `ilha/oxlint` rule `function-in-atom` flags `atom(fn)`.
atom
(0);
} catch (var error: unknownerror) { if (var error: unknownerror instanceof class IlhaError
Error thrown by ilha with a stable `code`, a `fix` hint and a `docs` URL.
IlhaError
) {
var console: Consoleconsole.Console.log(...data: any[]): void (+1 overload)
The **`console.log()`** static method outputs a message to the console. [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/log_static)
log
(var error: IlhaErrorerror.IlhaError.code: IlhaCodecode, var error: IlhaErrorerror.IlhaError.fix: stringfix, var error: IlhaErrorerror.IlhaError.docs: stringdocs);
} }

Warnings go through console.warn with the same message shape. Ilha shows each warning once per code and detail.

Code Kind Meaning
ILHA001 error A primitive ran with no active component
ILHA002 warning The atom/watch slot count changed between renders
ILHA003 error An atom handle was used from a different island
ILHA004 error A generator resumed while an instruction was running
ILHA005 warning Two sibling components share a key
ILHA006 warning Hydration found different markup and fully remounted
ILHA007 error renderToString found unsafe raw text in a tag

Was this page helpful?