SHARE
TWEET

Untitled

a guest Aug 12th, 2017 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
Top