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.
32 lines
592 B
32 lines
592 B
|
|
/*! |
|
* Module dependencies. |
|
*/ |
|
|
|
'use strict'; |
|
|
|
const MongooseError = require('./mongooseError'); |
|
|
|
/** |
|
* InvalidSchemaOption Error constructor. |
|
* @param {String} name |
|
* @api private |
|
*/ |
|
|
|
class InvalidSchemaOptionError extends MongooseError { |
|
|
|
constructor(name, option) { |
|
const msg = `Cannot create use schema for property "${name}" because the schema has the ${option} option enabled.`; |
|
super(msg); |
|
} |
|
} |
|
|
|
Object.defineProperty(InvalidSchemaOptionError.prototype, 'name', { |
|
value: 'InvalidSchemaOptionError' |
|
}); |
|
|
|
/*! |
|
* exports |
|
*/ |
|
|
|
module.exports = InvalidSchemaOptionError;
|
|
|