arnaucube
arnaucube/thoughtsPublic Self-hosted repository
thoughts/node_modules/mongoose/lib/errors/missingSchema.js
node_modules/mongoose/lib/errors/missingSchema.jsRaw
 1
 2/*!
 3 * Module dependencies.
 4 */
 5
 6var MongooseError = require('../error');
 7
 8/*!
 9 * MissingSchema Error constructor.
10 *
11 * @inherits MongooseError
12 */
13
14function MissingSchemaError (name) {
15  var msg = 'Schema hasn\'t been registered for model "' + name + '".\n'
16          + 'Use mongoose.model(name, schema)';
17  MongooseError.call(this, msg);
18  Error.captureStackTrace(this, arguments.callee);
19  this.name = 'MissingSchemaError';
20};
21
22/*!
23 * Inherits from MongooseError.
24 */
25
26MissingSchemaError.prototype.__proto__ = MongooseError.prototype;
27
28/*!
29 * exports
30 */
31
32module.exports = MissingSchemaError;