UNPKG

flying-squid

Version:
18 lines (15 loc) 356 B
class ExtendableError extends Error { constructor (message) { super(message) this.name = this.constructor.name this.message = message Error.captureStackTrace(this, this.constructor.name) } } class UserError extends ExtendableError { constructor (message) { super(message) this.userError = 1 } } module.exports = UserError