(paths)
| 12 | */ |
| 13 | |
| 14 | function DivergentArrayError(paths) { |
| 15 | var msg = 'For your own good, using `document.save()` to update an array ' |
| 16 | + 'which was selected using an $elemMatch projection OR ' |
| 17 | + 'populated using skip, limit, query conditions, or exclusion of ' |
| 18 | + 'the _id field when the operation results in a $pop or $set of ' |
| 19 | + 'the entire array is not supported. The following ' |
| 20 | + 'path(s) would have been modified unsafely:\n' |
| 21 | + ' ' + paths.join('\n ') + '\n' |
| 22 | + 'Use Model.update() to update these arrays instead.'; |
| 23 | // TODO write up a docs page (FAQ) and link to it |
| 24 | |
| 25 | MongooseError.call(this, msg); |
| 26 | this.name = 'DivergentArrayError'; |
| 27 | if (Error.captureStackTrace) { |
| 28 | Error.captureStackTrace(this); |
| 29 | } else { |
| 30 | this.stack = new Error().stack; |
| 31 | } |
| 32 | } |
| 33 | |
| 34 | /*! |
| 35 | * Inherits from MongooseError. |
nothing calls this directly
no outgoing calls
no test coverage detected