-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_exceptions.js
29 lines (24 loc) · 1.25 KB
/
_exceptions.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
function FalseIf(message, fileName, lineNumber){
const instance = new Error(message, fileName, lineNumber);
Object.setPrototypeOf(instance, Object.getPrototypeOf(this));
return instance;
}
FalseIf.prototype = Object.create(Error.prototype, {constructor: {value: Error,enumerable: false,writable: true,configurable: true}});
Object.setPrototypeOf(FalseIf, Error);
module.exports.FalseIf = FalseIf;
function TooManyDots(message, fileName, lineNumber){
const instance = new Error(message, fileName, lineNumber);
Object.setPrototypeOf(instance, Object.getPrototypeOf(this));
return instance;
}
TooManyDots.prototype = Object.create(Error.prototype, {constructor: {value: Error,enumerable: false,writable: true,configurable: true}});
Object.setPrototypeOf(TooManyDots, Error);
module.exports.TooManyDots = TooManyDots;
function SwitchDefault(message, fileName, lineNumber){
const instance = new Error(message, fileName, lineNumber);
Object.setPrototypeOf(instance, Object.getPrototypeOf(this));
return instance;
}
SwitchDefault.prototype = Object.create(Error.prototype, {constructor: {value: Error,enumerable: false,writable: true,configurable: true}});
Object.setPrototypeOf(SwitchDefault, Error);
module.exports.SwitchDefault = SwitchDefault;