不要怂,就是干,撸起袖子干!

Commit 0d086512 by Jonathan Crossman

- useful error message for bad data type (fixes #551)

1 parent 3580e56d
Showing with 6 additions and 0 deletions
...@@ -151,6 +151,12 @@ module.exports = (function() { ...@@ -151,6 +151,12 @@ module.exports = (function() {
options = options || {} options = options || {}
var globalOptions = this.options var globalOptions = this.options
for (var name in attributes){
if (attributes[name].type === undefined){
throw new Error(daoName + '.' + name + ' has been set it an undefined data type.');
}
}
if (globalOptions.define) { if (globalOptions.define) {
options = Utils._.extend({}, globalOptions.define, options) options = Utils._.extend({}, globalOptions.define, options)
Utils._(['classMethods', 'instanceMethods']).each(function(key) { Utils._(['classMethods', 'instanceMethods']).each(function(key) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!