aboutsummaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/har-validator/lib/error.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/har-validator/lib/error.js')
-rw-r--r--deps/npm/node_modules/har-validator/lib/error.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/deps/npm/node_modules/har-validator/lib/error.js b/deps/npm/node_modules/har-validator/lib/error.js
new file mode 100644
index 0000000000..f2618dc4f3
--- /dev/null
+++ b/deps/npm/node_modules/har-validator/lib/error.js
@@ -0,0 +1,17 @@
+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 = HARError