fix: Check SemanticReleaseError by error.semanticRelease property
This commit is contained in:
committed by
Gregor Martynus
parent
8a1dd7b324
commit
65d344bae8
+14
@@ -0,0 +1,14 @@
|
||||
const SemanticReleaseError = require('@semantic-release/error');
|
||||
|
||||
class InheritedError extends SemanticReleaseError {
|
||||
constructor(message, code, newProperty) {
|
||||
super(message);
|
||||
Error.captureStackTrace(this, this.constructor);
|
||||
this.name = this.constructor.name;
|
||||
this.code = code;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = function(config, options, cb) {
|
||||
cb(new InheritedError('Inherited error', 'EINHERITED'));
|
||||
};
|
||||
Reference in New Issue
Block a user