UNPKG

react-indexeddb-kit

Version:

A TypeScript-based React IndexedDB wrapper with CRUD operations.

27 lines (26 loc) 734 B
"use strict"; // src/errors/index.ts Object.defineProperty(exports, "__esModule", { value: true }); exports.ValidationError = exports.DatabaseError = void 0; /** * Custom error for database-related issues. */ class DatabaseError extends Error { constructor(message) { super(message); this.name = "DatabaseError"; Object.setPrototypeOf(this, DatabaseError.prototype); } } exports.DatabaseError = DatabaseError; /** * Custom error for validation issues. */ class ValidationError extends Error { constructor(message) { super(message); this.name = "ValidationError"; Object.setPrototypeOf(this, ValidationError.prototype); } } exports.ValidationError = ValidationError;