IntercomError.js
|
|
|
4 var util = require('util');
5
6
7
|
|
11
12 function AbstractError(message, constr) {
13 Error.apply(this, arguments);
14 Error.captureStackTrace(this, constr || this);
15
16 this.name = 'AbstractError';
17 this.message = message;
18 }
19
20
21
|
|
22
23 util.inherits(AbstractError, Error);
24
25
26
|
|
29
30 function IntercomError(message) {
31 AbstractError.apply(this, arguments);
32 this.name = 'IntercomError';
33 this.message = message;
34 }
35
36
37
|
Inherit from AbstractError .
|
38
39 util.inherits(IntercomError, AbstractError);
40
41
42
43
|
|
44
45 module.exports = IntercomError;
46
|