Skip to content

Error

1 min read

No import is needed.

Read the usage guide for examples and common tasks. This reference lists the public declarations for this part of the library. See Reading API signatures for parameter and result notation.

Error

Shared contract for fallible stdlib/user errors. Prefer Result<T, E> with E : Error.

public interface Error

message

Human-readable explanation of the failure, suitable for logs and error output.

fun message(): string

code

Stable machine code (ENOENT, EPARSE, HTTP_404, EINVAL, …).

fun code(): string