UNPKG

alisa.db

Version:

A powerful and customizable local JSON database module for Node.js projects with event system, caching, and full TypeScript support.

12 lines (11 loc) 345 B
class DatabaseError extends Error { constructor(error, code) { super(`[DatabaseError]: ${error}`) this.name = 'DatabaseError'; this.code = code; this.stack = (new Error()).stack; this.timestamp = new Date().toISOString(); this.message = error; } } export default DatabaseError;