Skip to content

Commit

Permalink
fix: missing file
Browse files Browse the repository at this point in the history
  • Loading branch information
oleg-koval committed Jan 17, 2018
1 parent d1d95a6 commit 41f8727
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions error/trembitaError.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/* istanbul ignore file */

/**
* TrembitaError constructor
*
* @param {String} msg Error message
* @inherits Error https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error
*/

class TrembitaError extends Error {
constructor(msg) {
super(...arguments); // eslint-disable-line prefer-rest-params
if (this.captureStackTrace) {
this.captureStackTrace();
} else {
this.stack = new Error().stack;
}
this.message = msg;
Object.defineProperty(this, 'name', { value: this.constructor.name })
}
}


/*!
* Module exports.
*/

module.exports = TrembitaError;

0 comments on commit 41f8727

Please sign in to comment.