LearnBoost/mongoose — Issue #578: Useful debugging
Author: cainiac
Created: 2011-10-26 06:11:00+00:00
State: open

When a schema is improperly configured, it's a pain to figure out what went wrong.

Put this bad boy in Schema.prototype.add in lib/schema.js:

if(obj[i] == undefined) {
throw new Error(i + ' is improperly defined.');
}

Tells you where things screwed up.