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.
29 lines
475 B
29 lines
475 B
/*! |
|
* Module dependencies. |
|
*/ |
|
|
|
'use strict'; |
|
|
|
const MongooseError = require('./mongooseError'); |
|
|
|
/** |
|
* MissingSchema Error constructor. |
|
*/ |
|
|
|
class MissingSchemaError extends MongooseError { |
|
|
|
constructor() { |
|
super('Schema hasn\'t been registered for document.\n' |
|
+ 'Use mongoose.Document(name, schema)'); |
|
} |
|
} |
|
|
|
Object.defineProperty(MissingSchemaError.prototype, 'name', { |
|
value: 'MongooseError' |
|
}); |
|
|
|
/*! |
|
* exports |
|
*/ |
|
|
|
module.exports = MissingSchemaError;
|
|
|