UNPKG

userface

Version:

Universal Data-Driven UI Engine with live data, validation, and multi-platform support

48 lines (47 loc) 1.63 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.RenderError = exports.ValidationError = exports.ComponentNotFoundError = exports.UserFaceError = void 0; // Типизированные ошибки class UserFaceError extends Error { constructor(message, code, details, face) { super(message); Object.defineProperty(this, "code", { enumerable: true, configurable: true, writable: true, value: code }); Object.defineProperty(this, "details", { enumerable: true, configurable: true, writable: true, value: details }); Object.defineProperty(this, "face", { enumerable: true, configurable: true, writable: true, value: face }); this.name = 'UserFaceError'; } } exports.UserFaceError = UserFaceError; class ComponentNotFoundError extends UserFaceError { constructor(componentName) { super(`Component "${componentName}" not found`, 'COMPONENT_NOT_FOUND', `Component "${componentName}" is not registered in the registry`); } } exports.ComponentNotFoundError = ComponentNotFoundError; class ValidationError extends UserFaceError { constructor(message, details, face) { super(message, 'VALIDATION_ERROR', details, face); } } exports.ValidationError = ValidationError; class RenderError extends UserFaceError { constructor(message, details, face) { super(message, 'RENDER_ERROR', details, face); } } exports.RenderError = RenderError;