MCPcopy Create free account
hub / github.com/Automattic/mongoose / OverwriteModelError

Function OverwriteModelError

lib/error/overwriteModel.js:14–22  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

12 */
13
14function OverwriteModelError(name) {
15 MongooseError.call(this, 'Cannot overwrite `' + name + '` model once compiled.');
16 this.name = 'OverwriteModelError';
17 if (Error.captureStackTrace) {
18 Error.captureStackTrace(this);
19 } else {
20 this.stack = new Error().stack;
21 }
22}
23
24/*!
25 * Inherits from MongooseError.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected