Skip to content

error

Error handling utilities with native implementation.

arc
use error

Functions

FunctionSignatureDescription
error(msg) -> ErrorCreate an error value
is_error(val) -> BoolCheck if value is an error
wrap_error(msg, cause) -> ErrorWrap an error with additional context
try_fn(fn) -> ResultRun function, catching errors as Result
try_catch(fn, handler) -> AnyTry/catch wrapper
try_finally(fn, cleanup) -> AnyTry/finally wrapper
try_catch_finally(fn, handler, cleanup) -> AnyTry/catch/finally wrapper
throw(msg) -> neverThrow an error
retry(fn, attempts) -> ResultRetry a function on failure

A programming language designed by AI agents, for AI agents.