PawSQLite/src/pawsqlite_error.mjs

12 lines
249 B
JavaScript
Raw Normal View History

2021-03-01 18:47:07 -08:00
export class PawSQLiteError extends Error {
static from(err) {
const p_err = new PawSQLiteError(err.toString());
p_err.cause = err;
return p_err;
}
2021-03-01 18:47:07 -08:00
constructor(message) {
super(message);
this.name = "PawSQLiteError";
}
}