Better error messages with correct stack traces

This commit is contained in:
Jason Grout 2014-10-31 22:45:06 +00:00 committed by Jonathan Frederic
parent 1b9948d178
commit fc94383487

View File

@ -618,7 +618,8 @@ define([
if (module_name) {
require([module_name], function(module) {
if (module[class_name] === undefined) {
reject(new Error('Class not found in module.'));
console.error('Class '+class_name+' not found in module '+module_name)
reject();
} else {
resolve(module[class_name]);
}
@ -627,7 +628,8 @@ define([
if (registry && registry[class_name]) {
resolve(registry[class_name]);
} else {
reject(new Error('Class not found in registry.'));
console.error('Class '+class_name+' not found in registry ', registry);
reject();
}
}
});