summaryrefslogtreecommitdiffstats
path: root/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/error/missingSchema.js
diff options
context:
space:
mode:
Diffstat (limited to 'common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/error/missingSchema.js')
-rw-r--r--common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/error/missingSchema.js33
1 files changed, 33 insertions, 0 deletions
diff --git a/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/error/missingSchema.js b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/error/missingSchema.js
new file mode 100644
index 0000000..25eabfa
--- /dev/null
+++ b/common/src/main/webapp/usageguide/appserver/node_modules/mongoose/lib/error/missingSchema.js
@@ -0,0 +1,33 @@
+
+/*!
+ * Module dependencies.
+ */
+
+var MongooseError = require('../error.js');
+
+/*!
+ * MissingSchema Error constructor.
+ *
+ * @inherits MongooseError
+ */
+
+function MissingSchemaError(name) {
+ var msg = 'Schema hasn\'t been registered for model "' + name + '".\n'
+ + 'Use mongoose.model(name, schema)';
+ MongooseError.call(this, msg);
+ Error.captureStackTrace && Error.captureStackTrace(this, arguments.callee);
+ this.name = 'MissingSchemaError';
+}
+
+/*!
+ * Inherits from MongooseError.
+ */
+
+MissingSchemaError.prototype = Object.create(MongooseError.prototype);
+MissingSchemaError.prototype.constructor = MongooseError;
+
+/*!
+ * exports
+ */
+
+module.exports = MissingSchemaError;