Skip to main content

xtlError()

function xtlError(code, message): XtlError;

Defined in: src/error-codes.ts:101

Construct an Error with a stable code (ADR-0015). Hosts dispatch on error.code for localization and programmatic handling; the English error.message remains the conformance-corpus contract.

Parameters

ParameterType
codeXtlErrorCode
messagestring

Returns

XtlError

Stable

Frozen at 1.0 per spec/STABILITY.md "Public API surface".

Example

throw xtlError('xl3/filename/empty', 'Output filename resolved to empty');