Skip to content
Browse files

Slightly more descriptive error messages

  • Loading branch information...
1 parent 772f7e3 commit 7391dfae634258b5c0bc00c5ce487c69e071853c @timoxley timoxley committed Dec 23, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/kin.js
View
4 lib/kin.js
@@ -16,7 +16,7 @@ function generate(type, overrideProperties, callback) {
var currentBlueprint = this.blueprint(type)
if (!this.blueprint(type)){
- return callback(new Error('Invalid model in '+type+' blueprint: ' + modelType))
+ return callback(new Error('Invalid model type in '+type+' blueprint: ' + modelType))
}
var modelType = this.blueprint(type)._model
var Model
@@ -25,7 +25,7 @@ function generate(type, overrideProperties, callback) {
// mongoose instance must be passed in
modelType = this.mongoose && this.mongoose.models[modelType]
if (!modelType) {
- return callback(new Error('Invalid string model in '+type+' blueprint: ' + this.blueprint(type)._model))
+ return callback(new Error('Invalid string model type in '+type+' blueprint: ' + this.blueprint(type)._model))
}
}
Model = this.generator(modelType)

0 comments on commit 7391dfa

Please sign in to comment.
Something went wrong with that request. Please try again.