import { PawSQLiteError } from "../../pawsqlite_error.mjs"; export class PSQLAdapterError extends PawSQLiteError { constructor(response) { if (response.hasOwnProperty("message")) { super(response.message); } else { super(); } if (response.hasOwnProperty("name")) { this.name = response.name; } else { this.name = "PSQLAdapterError"; } if (response.hasOwnProperty("trace")) { this.trace = response.trace; } } toString() { let str = this.name; if (this.hasOwnProperty("message")) { str += ": " + this.message; } if (this.hasOwnProperty("trace")) { str += "\n" + this.trace; } return str; } }