-
Notifications
You must be signed in to change notification settings - Fork 84
/
Copy pathlogger-error.js
58 lines (49 loc) · 1.13 KB
/
logger-error.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
'use strict';
module.exports = {};
class BaseError extends Error {
constructor(message, options) {
super();
Error.captureStackTrace(this, this.constructor);
this.name = this.constructor.name;
this.message = message;
this.options = options;
}
}
class ConfigError extends BaseError {
constructor(message, options) {
super(message, options);
}
}
class MissingTagError extends BaseError {
constructor(message, options) {
super(message, options);
}
}
class ResponseError extends BaseError {
constructor(message, options) {
super(message, options);
}
}
class ResponseTimeoutError extends BaseError {
constructor(message, options) {
super(message, options);
}
}
class DataTypeError extends BaseError {
constructor(message, options) {
super(message, options);
}
}
class HandshakeError extends BaseError {
constructor(message, options) {
super(message, options);
}
}
module.exports = {
ConfigError: ConfigError,
MissingTag: MissingTagError,
ResponseError: ResponseError,
DataTypeError: DataTypeError,
ResponseTimeout: ResponseTimeoutError,
HandshakeError: HandshakeError
};