Exception struct for Tyrex runtime errors.
Fields:
:name- Error type atom. One of::execution_error— JS/TS code raised or failed to compile:promise_rejection— Returned promise rejected;:valueholds the decoded rejection value:conversion_error— A value could not be converted between Elixir and JavaScript representations:dead_runtime_error— The underlying runtime is no longer alive (e.g. crashed, was killed, or was stopped while a call was in flight):timeout— Anevalexceeded its:timeoutdeadline. The V8 isolate was terminated, so the runtime is dead and must be replaced:heap_limit_error— The guest exceeded the runtime's:max_heap_mbcap. The isolate was terminated, so the runtime is dead:unsupported_option— The requested combination of options cannot be served. Two producers:blocking: trueon a runtime with the:applybridge enabled, which would deadlock, andtimeout: :infinityon either eval path, which would arm no deadline at all
:message- Human-readable error message (optional):value- Additional error value, such as the rejected promise value (optional)
Summary
Types
A Tyrex.Error exception with a tagged :name, optional human-readable
:message, and an optional :value payload (used for promise rejections).
Functions
Build a Tyrex.Error exception from a keyword list.
Format a Tyrex.Error as a human-readable string. Used by Elixir when
the exception is raised or inspected via Exception.message/1.
Types
@type t() :: %Tyrex.Error{ __exception__: term(), message: String.t() | nil, name: atom(), value: term() | nil }
A Tyrex.Error exception with a tagged :name, optional human-readable
:message, and an optional :value payload (used for promise rejections).
Functions
Build a Tyrex.Error exception from a keyword list.
Required: :name. Optional: :message, :value. This is the callback
used by raise Tyrex.Error, name: :dead_runtime_error and similar.
Format a Tyrex.Error as a human-readable string. Used by Elixir when
the exception is raised or inspected via Exception.message/1.