Initial commit
[yaffs-website] / node_modules / har-validator / lib / browser / error.js
1 export default function HARError(errors) {
2   let message = 'validation failed';
3
4   this.name = 'HARError';
5   this.message = message;
6   this.errors = errors;
7
8   if (typeof Error.captureStackTrace === 'function') {
9     Error.captureStackTrace(this, this.constructor);
10   } else {
11     this.stack = new Error(message).stack;
12   }
13 }
14
15 HARError.prototype = Error.prototype;