Last change
on this file since 76712b2 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
373 bytes
|
Line | |
---|
1 | function HARError (errors) {
|
---|
2 | var 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
|
---|
16 |
|
---|
17 | module.exports = HARError
|
---|
Note:
See
TracBrowser
for help on using the repository browser.