renamed database schemaCheck method to initialize
[websub-hub] / src / db / errors.js
1 'use strict';
2
3 const { DatabaseError } = require('../errors');
4
5 class DataValidation extends DatabaseError {
6 constructor(...args) {
7 super(...args);
8 Error.captureStackTrace(DataValidation);
9 }
10 }
11
12 class NotImplemented extends DatabaseError {
13 constructor(...args) {
14 super(...args);
15 Error.captureStackTrace(NotImplemented);
16 }
17 }
18
19 class UnexpectedResult extends DatabaseError {
20 constructor(...args) {
21 super(...args);
22 Error.captureStackTrace(UnexpectedResult);
23 }
24 }
25
26 class UnsupportedEngine extends DatabaseError {
27 constructor(...args) {
28 super(...args);
29 Error.captureStackTrace(UnsupportedEngine);
30 }
31 }
32
33 class MigrationNeeded extends DatabaseError {
34 constructor(...args) {
35 super(...args);
36 }
37 }
38
39 module.exports = {
40 DataValidation,
41 MigrationNeeded,
42 NotImplemented,
43 UnexpectedResult,
44 UnsupportedEngine,
45 };