UNPKG

560 BJavaScriptView Raw
1'use strict';
2
3/*!
4 * Module dependencies.
5 */
6
7const MongooseError = require('./mongooseError');
8
9
10class 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
23Object.defineProperty(ParallelValidateError.prototype, 'name', {
24 value: 'ParallelValidateError'
25});
26
27/*!
28 * exports
29 */
30
31module.exports = ParallelValidateError;
\No newline at end of file