summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/har-validator/lib/node4/error.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/har-validator/lib/node4/error.js')
-rw-r--r--deps/npm/node_modules/har-validator/lib/node4/error.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/deps/npm/node_modules/har-validator/lib/node4/error.js b/deps/npm/node_modules/har-validator/lib/node4/error.js
new file mode 100644
index 0000000000..0ae01bd18c
--- /dev/null
+++ b/deps/npm/node_modules/har-validator/lib/node4/error.js
@@ -0,0 +1,22 @@
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = HARError;
+function HARError(errors) {
+ var message = 'validation failed';
+
+ this.name = 'HARError';
+ this.message = message;
+ this.errors = errors;
+
+ if (typeof Error.captureStackTrace === 'function') {
+ Error.captureStackTrace(this, this.constructor);
+ } else {
+ this.stack = new Error(message).stack;
+ }
+}
+
+HARError.prototype = Error.prototype;
+module.exports = exports['default']; \ No newline at end of file