Skip to content

Commit

Permalink
Slightly more descriptive error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
timoxley committed Dec 22, 2011
1 parent 772f7e3 commit 7391dfa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/kin.js
Expand Up @@ -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
Expand All @@ -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)
Expand Down

0 comments on commit 7391dfa

Please sign in to comment.