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.

17 lines
373 B

  1. function HARError (errors) {
  2. var message = 'validation failed'
  3. this.name = 'HARError'
  4. this.message = message
  5. this.errors = errors
  6. if (typeof Error.captureStackTrace === 'function') {
  7. Error.captureStackTrace(this, this.constructor)
  8. } else {
  9. this.stack = (new Error(message)).stack
  10. }
  11. }
  12. HARError.prototype = Error.prototype
  13. module.exports = HARError