UNPKG

postgrejs

Version:

Professional PostgreSQL client NodeJS

18 lines (17 loc) 490 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.DatabaseError = void 0; class DatabaseError extends Error { constructor(msg) { super(msg.message); Object.assign(this, { ...msg, line: undefined, file: undefined, routine: undefined, }); if (msg.position) this.position = parseInt(msg.position, 10) || undefined; } } exports.DatabaseError = DatabaseError;