mirror of
https://github.com/mgerb/mywebsite
synced 2026-01-13 03:02:49 +00:00
Added all files
This commit is contained in:
37
node_modules/mongoose/lib/error/cast.js
generated
vendored
Normal file
37
node_modules/mongoose/lib/error/cast.js
generated
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
/*!
|
||||
* Module dependencies.
|
||||
*/
|
||||
|
||||
var MongooseError = require('../error.js');
|
||||
|
||||
/**
|
||||
* Casting Error constructor.
|
||||
*
|
||||
* @param {String} type
|
||||
* @param {String} value
|
||||
* @inherits MongooseError
|
||||
* @api private
|
||||
*/
|
||||
|
||||
function CastError (type, value, path) {
|
||||
MongooseError.call(this, 'Cast to ' + type + ' failed for value "' + value + '" at path "' + path + '"');
|
||||
Error.captureStackTrace && Error.captureStackTrace(this, arguments.callee);
|
||||
this.name = 'CastError';
|
||||
this.kind = type;
|
||||
this.value = value;
|
||||
this.path = path;
|
||||
};
|
||||
|
||||
/*!
|
||||
* Inherits from MongooseError.
|
||||
*/
|
||||
|
||||
CastError.prototype = Object.create(MongooseError.prototype);
|
||||
CastError.prototype.constructor = MongooseError;
|
||||
|
||||
|
||||
/*!
|
||||
* exports
|
||||
*/
|
||||
|
||||
module.exports = CastError;
|
||||
Reference in New Issue
Block a user