error.js 494 B

12345678910111213141516171819202122
  1. 'use strict';
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = HARError;
  6. function HARError(errors) {
  7. var message = 'validation failed';
  8. this.name = 'HARError';
  9. this.message = message;
  10. this.errors = errors;
  11. if (typeof Error.captureStackTrace === 'function') {
  12. Error.captureStackTrace(this, this.constructor);
  13. } else {
  14. this.stack = new Error(message).stack;
  15. }
  16. }
  17. HARError.prototype = Error.prototype;
  18. module.exports = exports['default'];