/** * @license * Copyright 2022-2026 Matter.js Authors * SPDX-License-Identifier: Apache-2.0 */ import { Constraint, Schema, SchemaErrorPath } from "@matter/model"; import { Status, StatusResponseError } from "@matter/types"; export { SchemaImplementationError } from "@matter/model"; /** * Thrown due operational schema violation. */ export declare class SchemaViolationError extends StatusResponseError { constructor(prefix: string, path: SchemaErrorPath, message: string, code: Status); } /** * Thrown for invalid reads. */ export declare class ReadError extends SchemaViolationError { constructor(path: SchemaErrorPath, message: string, code?: Status); } /** * Thrown for invalid writes. */ export declare class WriteError extends SchemaViolationError { constructor(path: SchemaErrorPath, message: string, code?: Status); } /** * Thrown for invalid invokes. */ export declare class InvokeError extends SchemaViolationError { constructor(path: SchemaErrorPath, message: string, code?: Status); } /** * Thrown when validation fails. */ export declare class ValidateError extends SchemaViolationError { constructor(path: SchemaErrorPath, message: string, code?: Status); } /** * Thrown when a value is of the wrong datatype. */ export declare class DatatypeError extends ValidateError { constructor(path: SchemaErrorPath, type: string, value: unknown, code?: Status); } /** * Thrown when constraint is violated. */ export declare class ConstraintError extends ValidateError { /** * @param constraint the constraint the value violated; by default the constraint {@link schema} states or inherits */ constructor(schema: Schema, path: SchemaErrorPath, message: string, constraint?: Constraint); } /** * Thrown when a numeric value can't fit in an integer type. */ export declare class IntegerRangeError extends ValidateError { constructor(path: SchemaErrorPath, message: string); } /** * Thrown when an enum value is not known based on Matter specification */ export declare class UnknownEnumValueError extends ValidateError { constructor(path: SchemaErrorPath, message: string); } /** * Thrown when conformance is violated. */ export declare class ConformanceError extends ValidateError { constructor(schema: Schema, path: SchemaErrorPath, message: string, choice?: string); } /** * Thrown when an enum value is not valid based on conformance definitions */ export declare class EnumValueConformanceError extends ConformanceError { } /** * Thrown for access attempts against a managed value that is no longer valid. */ export declare class ExpiredReferenceError extends SchemaViolationError { constructor(path: SchemaErrorPath); } /** * Thrown for access attempts against a managed value referencing a container that was removed. */ export declare class PhantomReferenceError extends SchemaViolationError { constructor(path: SchemaErrorPath); } //# sourceMappingURL=errors.d.ts.map