Manual Reference Source

app/modules/exceptions/generic.js

  1. function GenericException(name, error, status, path) {
  2. Error.call(this, error.message);
  3. Error.captureStackTrace(this, this.constructor);
  4. this.name = name;
  5. this.message = error.message;
  6. this.status = status || 500;
  7. this.path = path || null;
  8. this.inner = error;
  9. }
  10. GenericException.prototype = Object.create(Error.prototype);
  11. GenericException.prototype.constructor = GenericException;
  12.  
  13. module.exports = GenericException;