(query)
| 14 | */ |
| 15 | |
| 16 | function DocumentNotFoundError(query) { |
| 17 | var msg; |
| 18 | var messages = MongooseError.messages; |
| 19 | if (messages.DocumentNotFoundError != null) { |
| 20 | msg = typeof messages.DocumentNotFoundError === 'function' ? |
| 21 | messages.DocumentNotFoundError(query) : |
| 22 | messages.DocumentNotFoundError; |
| 23 | } else { |
| 24 | msg = 'No document found for query "' + util.inspect(query) + '"'; |
| 25 | } |
| 26 | |
| 27 | MongooseError.call(this, msg); |
| 28 | |
| 29 | this.name = 'DocumentNotFoundError'; |
| 30 | if (Error.captureStackTrace) { |
| 31 | Error.captureStackTrace(this); |
| 32 | } else { |
| 33 | this.stack = new Error().stack; |
| 34 | } |
| 35 | |
| 36 | this.query = query; |
| 37 | } |
| 38 | |
| 39 | /*! |
| 40 | * Inherits from MongooseError. |
nothing calls this directly
no outgoing calls
no test coverage detected