init source

This commit is contained in:
Le Viet
2022-03-07 22:07:57 +07:00
parent e4376f3777
commit 8aba590a8d
11240 changed files with 1012977 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
'use strict';
const ConnectionError = require('./../connection-error');
/**
* Thrown when a connection to a database is refused due to insufficient privileges
*/
class AccessDeniedError extends ConnectionError {
constructor(parent) {
super(parent);
this.name = 'SequelizeAccessDeniedError';
Error.captureStackTrace(this, this.constructor);
}
}
module.exports = AccessDeniedError;
@@ -0,0 +1,16 @@
'use strict';
const ConnectionError = require('./../connection-error');
/**
* Thrown when connection is not acquired due to timeout
*/
class ConnectionAcquireTimeoutError extends ConnectionError {
constructor(parent) {
super(parent);
this.name = 'SequelizeConnectionAcquireTimeoutError';
Error.captureStackTrace(this, this.constructor);
}
}
module.exports = ConnectionAcquireTimeoutError;
@@ -0,0 +1,16 @@
'use strict';
const ConnectionError = require('./../connection-error');
/**
* Thrown when a connection to a database is refused
*/
class ConnectionRefusedError extends ConnectionError {
constructor(parent) {
super(parent);
this.name = 'SequelizeConnectionRefusedError';
Error.captureStackTrace(this, this.constructor);
}
}
module.exports = ConnectionRefusedError;
@@ -0,0 +1,16 @@
'use strict';
const ConnectionError = require('./../connection-error');
/**
* Thrown when a connection to a database times out
*/
class ConnectionTimedOutError extends ConnectionError {
constructor(parent) {
super(parent);
this.name = 'SequelizeConnectionTimedOutError';
Error.captureStackTrace(this, this.constructor);
}
}
module.exports = ConnectionTimedOutError;
+16
View File
@@ -0,0 +1,16 @@
'use strict';
const ConnectionError = require('./../connection-error');
/**
* Thrown when a connection to a database has a hostname that was not found
*/
class HostNotFoundError extends ConnectionError {
constructor(parent) {
super(parent);
this.name = 'SequelizeHostNotFoundError';
Error.captureStackTrace(this, this.constructor);
}
}
module.exports = HostNotFoundError;
@@ -0,0 +1,16 @@
'use strict';
const ConnectionError = require('./../connection-error');
/**
* Thrown when a connection to a database has a hostname that was not reachable
*/
class HostNotReachableError extends ConnectionError {
constructor(parent) {
super(parent);
this.name = 'SequelizeHostNotReachableError';
Error.captureStackTrace(this, this.constructor);
}
}
module.exports = HostNotReachableError;
@@ -0,0 +1,16 @@
'use strict';
const ConnectionError = require('./../connection-error');
/**
* Thrown when a connection to a database has invalid values for any of the connection parameters
*/
class InvalidConnectionError extends ConnectionError {
constructor(parent) {
super(parent);
this.name = 'SequelizeInvalidConnectionError';
Error.captureStackTrace(this, this.constructor);
}
}
module.exports = InvalidConnectionError;