(path, val)
| 17 | class ObjectExpectedError extends MongooseError { |
| 18 | |
| 19 | constructor(path, val) { |
| 20 | const typeDescription = Array.isArray(val) ? 'array' : 'primitive value'; |
| 21 | super('Tried to set nested object field `' + path + |
| 22 | `\` to ${typeDescription} \`` + val + '`'); |
| 23 | this.path = path; |
| 24 | } |
| 25 | } |
| 26 | |
| 27 | Object.defineProperty(ObjectExpectedError.prototype, 'name', { |
nothing calls this directly
no outgoing calls
no test coverage detected