semantic-release/test/fixtures/plugin-error-inherited.js
2018-08-06 11:48:44 -04:00

15 lines
379 B
JavaScript

const SemanticReleaseError = require('@semantic-release/error');
class InheritedError extends SemanticReleaseError {
constructor(message, code) {
super(message);
Error.captureStackTrace(this, this.constructor);
this.name = this.constructor.name;
this.code = code;
}
}
module.exports = () => {
throw new InheritedError('Inherited error', 'EINHERITED');
};