UNPKG

postgrejs

Version:

Professional PostgreSQL client NodeJS

14 lines (13 loc) 349 B
export 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; } }