Ohm-Management - Projektarbeit B-ME
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

mongooseError.js 581B

12345678910111213141516171819202122232425262728
  1. /**
  2. * MongooseError constructor
  3. *
  4. * @param {String} msg Error message
  5. * @inherits Error https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error
  6. */
  7. 'use strict';
  8. function MongooseError(msg) {
  9. Error.call(this);
  10. if (Error.captureStackTrace) {
  11. Error.captureStackTrace(this);
  12. } else {
  13. this.stack = new Error().stack;
  14. }
  15. this.message = msg;
  16. this.name = 'MongooseError';
  17. }
  18. /*!
  19. * Inherits from Error.
  20. */
  21. MongooseError.prototype = Object.create(Error.prototype);
  22. MongooseError.prototype.constructor = Error;
  23. module.exports = MongooseError;