Enhance the error message

This commit is contained in:
Raymond Feng 2014-07-16 11:04:23 -07:00
parent ec297228bf
commit a28e5b5897
1 changed files with 2 additions and 2 deletions

View File

@ -142,7 +142,7 @@ app.model = function (Model, config) {
isPublic = config.public !== false;
} else {
assert(Model.prototype instanceof registry.Model,
'Model must be a descendant of loopback.Model');
Model.modelName + ' must be a descendant of loopback.Model');
}
var modelName = Model.modelName;
@ -616,7 +616,7 @@ function dataSourcesFromConfig(config, connectorRegistry) {
function configureModel(ModelCtor, config, app) {
assert(ModelCtor.prototype instanceof registry.Model,
'Model must be a descendant of loopback.Model');
ModelCtor.modelName + ' must be a descendant of loopback.Model');
var dataSource = config.dataSource;