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

Class SqliteError

lib/sqlite-error.js:3–16  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1'use strict';
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', {
19 value: 'SqliteError',

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected