mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-27 04:20:22 +08:00
catch errors in comm callbacks
This commit is contained in:
parent
938dc589dd
commit
34efd17408
@ -172,7 +172,13 @@ var IPython = (function (IPython) {
|
||||
|
||||
Comm.prototype._maybe_callback = function (key, msg) {
|
||||
var callback = this['_' + key + '_callback'];
|
||||
if (callback) callback(msg);
|
||||
if (callback) {
|
||||
try {
|
||||
callback(msg);
|
||||
} catch (e) {
|
||||
console.log("Exception in Comm callback", e, msg);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Comm.prototype.handle_msg = function (msg) {
|
||||
|
Loading…
Reference in New Issue
Block a user