MCPcopy Create free account
hub / github.com/WiseLibs/better-sqlite3 / constructor

Method constructor

lib/sqlite-error.js:4–15  ·  view source on GitHub ↗
(message, code)

Source from the content-addressed store, hash-verified

2
3class SqliteError extends Error {
4 constructor(message, code) {
5 if (typeof code !== 'string') {
6 throw new TypeError('Expected second argument to be a string');
7 }
8
9 super('' + message);
10 this.code = code;
11
12 if (typeof Error.captureStackTrace === 'function') {
13 Error.captureStackTrace(this, SqliteError);
14 }
15 }
16}
17
18Object.defineProperty(SqliteError.prototype, 'name', {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected