UNPKG

@arpinum/ddd

Version:
14 lines (10 loc) 267 B
'use strict'; class CustomError extends Error { constructor(message = 'Error') { super(message); Error.captureStackTrace(this, this.constructor); this.message = this.message; this.name = this.constructor.name; } } module.exports = CustomError;