We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 3136901 + 7f19f17 commit d8d8ab7Copy full SHA for d8d8ab7
lib/errors.js
@@ -7,11 +7,12 @@
7
// - **error_description** (`String`) - the error description
8
//
9
var FigoError = function(error, error_description, errno) {
10
+ Error.captureStackTrace(this, FigoError);
11
+
12
this.name = 'FigoError';
13
this.error = error;
- this.error_description = error_description;
14
+ this.message = this.error_description = error_description;
15
this.errno = errno;
- this.stack = (new Error()).stack;
16
};
17
FigoError.prototype = Object.create(Error.prototype);
18
FigoError.prototype.constructor = FigoError;
@@ -20,5 +21,5 @@ FigoError.prototype.toString = function() {
20
21
22
23
module.exports = {
- FigoError: FigoError
24
+ FigoError: FigoError
25
0 commit comments