Initial commit
[yaffs-website] / node_modules / har-validator / lib / node4 / error.js
1 'use strict';
2
3 Object.defineProperty(exports, "__esModule", {
4   value: true
5 });
6 exports.default = HARError;
7 function HARError(errors) {
8   var message = 'validation failed';
9
10   this.name = 'HARError';
11   this.message = message;
12   this.errors = errors;
13
14   if (typeof Error.captureStackTrace === 'function') {
15     Error.captureStackTrace(this, this.constructor);
16   } else {
17     this.stack = new Error(message).stack;
18   }
19 }
20
21 HARError.prototype = Error.prototype;
22 module.exports = exports['default'];