fliphub-monorepo
Version:
the builder of builders
14 lines (12 loc) • 332 B
JavaScript
class AbstractError extends Error {
constructor(message) {
super(message)
this.name = this.constructor.name
if (typeof Error.captureStackTrace === 'function') {
Error.captureStackTrace(this, this.constructor)
} else {
this.stack = (new Error(message)).stack
}
}
}
module.exports = AbstractError