This repository was archived by the owner on Feb 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
Copy patherrors.js
78 lines (64 loc) · 2.09 KB
/
errors.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
'use strict'
class NotInitializedError extends Error {
constructor (message = 'not initialized') {
super(message)
this.name = 'NotInitializedError'
this.code = NotInitializedError.code
}
}
NotInitializedError.code = 'ERR_NOT_INITIALIZED'
exports.NotInitializedError = NotInitializedError
class AlreadyInitializingError extends Error {
constructor (message = 'cannot initialize an initializing node') {
super(message)
this.name = 'AlreadyInitializingError'
this.code = AlreadyInitializedError.code
}
}
AlreadyInitializingError.code = 'ERR_ALREADY_INITIALIZING'
exports.AlreadyInitializingError = AlreadyInitializingError
class AlreadyInitializedError extends Error {
constructor (message = 'cannot re-initialize an initialized node') {
super(message)
this.name = 'AlreadyInitializedError'
this.code = AlreadyInitializedError.code
}
}
AlreadyInitializedError.code = 'ERR_ALREADY_INITIALIZED'
exports.AlreadyInitializedError = AlreadyInitializedError
class NotStartedError extends Error {
constructor (message = 'not started') {
super(message)
this.name = 'NotStartedError'
this.code = NotStartedError.code
}
}
NotStartedError.code = 'ERR_NOT_STARTED'
exports.NotStartedError = NotStartedError
class AlreadyStartingError extends Error {
constructor (message = 'cannot start, already startin') {
super(message)
this.name = 'AlreadyStartingError'
this.code = AlreadyStartingError.code
}
}
AlreadyStartingError.code = 'ERR_ALREADY_STARTING'
exports.AlreadyStartingError = AlreadyStartingError
class AlreadyStartedError extends Error {
constructor (message = 'cannot start, already started') {
super(message)
this.name = 'AlreadyStartedError'
this.code = AlreadyStartedError.code
}
}
AlreadyStartedError.code = 'ERR_ALREADY_STARTED'
exports.AlreadyStartedError = AlreadyStartedError
class NotEnabledError extends Error {
constructor (message = 'not enabled') {
super(message)
this.name = 'NotEnabledError'
this.code = NotEnabledError.code
}
}
NotEnabledError.code = 'ERR_NOT_ENABLED'
exports.NotEnabledError = NotEnabledError