1 | ;
|
2 |
|
3 | /*!
|
4 | * Module dependencies.
|
5 | */
|
6 |
|
7 | const MongooseError = require('./mongooseError');
|
8 |
|
9 |
|
10 | class ParallelValidateError extends MongooseError {
|
11 | /**
|
12 | * ParallelValidate Error constructor.
|
13 | *
|
14 | * @param {Document} doc
|
15 | * @api private
|
16 | */
|
17 | constructor(doc) {
|
18 | const msg = 'Can\'t validate() the same doc multiple times in parallel. Document: ';
|
19 | super(msg + doc._id);
|
20 | }
|
21 | }
|
22 |
|
23 | Object.defineProperty(ParallelValidateError.prototype, 'name', {
|
24 | value: 'ParallelValidateError'
|
25 | });
|
26 |
|
27 | /*!
|
28 | * exports
|
29 | */
|
30 |
|
31 | module.exports = ParallelValidateError; |
\ | No newline at end of file |