Skip to content

Commit

Permalink
Merge pull request #220 from enyojs/improved_error_msg
Browse files Browse the repository at this point in the history
improved error message

Reviewed-By: Ben Combee (ben.combee@palm.com)
  • Loading branch information
unwiredben committed Jan 9, 2013
2 parents 13c36e9 + 365c5b6 commit a251bab
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion source/kernel/Oop.js
Expand Up @@ -33,7 +33,8 @@ enyo.kind = function(inProps) {
// if we have an explicit kind property with value undefined, we probably
// tried to reference a kind that is not yet in scope
if (hasKind && kind === undefined || base === undefined) {
throw "enyo.kind: Attempt to subclass an undefined kind. Check dependencies for [" + (name || "<unnamed>") + "].";
var problem = kind === undefined ? 'undefined kind' : 'unknown kind (' + kind + ')';
throw "enyo.kind: Attempt to subclass an " + problem + ". Check dependencies for [" + (name || "<unnamed>") + "].";
}
// make a boilerplate constructor
var ctor = enyo.kind.makeCtor();
Expand Down

0 comments on commit a251bab

Please sign in to comment.