Advertisement
Guest User

Untitled

a guest
Aug 12th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. module.exports = function CustomError(message) {
  2. this.name = this.constructor.name
  3. this.message = message
  4. Error.captureStackTrace(this, this.constructor)
  5. }
  6.  
  7. module.exports.prototype.inspect = function () {
  8. return this.stack
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement