FieldError class

Module @runic-artifex/views in @runic-artifex/views 0.23.0

class FieldError extends Error

A checked write's receipt that is not a plain success, or a text that does not parse. See FieldErrorKind. message is English. Show a translated text with resolveText(error) (useText, runicText in the framework packages) after configureFieldErrorText, which reads reason and arguments.

Constructors

constructor

constructor(kind: FieldErrorKind, message: string, current?: FieldBaseline<unknown>, detail?: FieldErrorDetail);

No documentation.

Properties

kind

readonly kind: FieldErrorKind;

No documentation.

current

readonly current?: FieldBaseline<unknown>;

The producer's field after the write: the incoming value of a conflict, the committed one of committed-with-error.

reason

readonly reason?: FieldErrorReason;

Why a text does not parse, for an invalid-text error of Runic's parsers; undefined for the other kinds and for a text that a field's own parse refused.

arguments

readonly arguments: FieldErrorArguments;

The parts of the message for reason; empty without one. Frozen.

Methods

[Symbol.hasInstance]

static [Symbol.hasInstance](value: unknown): boolean;

No documentation.