error-handling

Installation
SKILL.md

Skill: Error Handling

Every failure the library raises carries a machine-readable code. Consumers branch on the code; the message is for humans and may be reworded in any release.

Never make control flow depend on message text. A regex over e.message is the exact failure this design exists to prevent.

src/core/error.ts is the source of truth. cpp/core/error.h mirrors it by hand, the same way the rest of the TS/JSI interface is mirrored (DType definitions, schema types, host object interfaces). Nothing here is generated. If you add a code, add it in both files.


🚦 Throwing

One factory, usable everywhere including inside worklets:

Installs
2
GitHub Stars
1.8K
First Seen
Oct 25, 2026
Security Audits