You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
556 B
33 lines
556 B
'use strict'; |
|
|
|
/*! |
|
* Module dependencies. |
|
*/ |
|
|
|
const MongooseError = require('./mongooseError'); |
|
|
|
|
|
/** |
|
* ParallelValidate Error constructor. |
|
* |
|
* @param {Document} doc |
|
* @api private |
|
*/ |
|
|
|
class ParallelValidateError extends MongooseError { |
|
|
|
constructor(doc) { |
|
const msg = 'Can\'t validate() the same doc multiple times in parallel. Document: '; |
|
super(msg + doc._doc._id); |
|
} |
|
} |
|
|
|
Object.defineProperty(ParallelValidateError.prototype, 'name', { |
|
value: 'ParallelValidateError' |
|
}); |
|
|
|
/*! |
|
* exports |
|
*/ |
|
|
|
module.exports = ParallelValidateError;
|
|
|