mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-12 11:45:38 +08:00
Better error messages with correct stack traces
This commit is contained in:
parent
1b9948d178
commit
fc94383487
@ -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();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user