mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-12 11:45:38 +08:00
Don't throw Errors with Objects as the message/
This commit is contained in:
parent
17108fed3b
commit
fed878fed9
@ -656,10 +656,7 @@ define([
|
||||
if (registry && registry[class_name]) {
|
||||
resolve(registry[class_name]);
|
||||
} else {
|
||||
reject(new Error({
|
||||
message: 'Class '+class_name+' not found in registry ',
|
||||
registry: registry
|
||||
}));
|
||||
reject(new Error('Class '+class_name+' not found in registry '));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -75,10 +75,7 @@ define(["widgets/js/manager",
|
||||
case 'update':
|
||||
this.state_change = this.state_change.then(function() {
|
||||
return that.set_state(msg.content.data.state);
|
||||
}).catch(utils.reject({
|
||||
message: "Couldn't process update msg",
|
||||
model_id: that.id
|
||||
}, true));
|
||||
}).catch(utils.reject("Couldn't process update msg for model id '" + String(that.id) + "'", true));
|
||||
break;
|
||||
case 'custom':
|
||||
this.trigger('msg:custom', msg.content.data.content);
|
||||
@ -86,10 +83,7 @@ define(["widgets/js/manager",
|
||||
case 'display':
|
||||
this.state_change = this.state_change.then(function () {
|
||||
return that.widget_manager.display_view(msg, that);
|
||||
}).catch(utils.reject({
|
||||
message: "Couldn't process display msg",
|
||||
model_id: that.id
|
||||
}, true));
|
||||
}).catch(utils.reject("Couldn't process display msg for model id '" + String(that.id) + "'", true));
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user