##// END OF EJS Templates
Don't throw Errors with Objects as the message/
Jonathan Frederic -
Show More
@@ -656,10 +656,7 define([
656 if (registry && registry[class_name]) {
656 if (registry && registry[class_name]) {
657 resolve(registry[class_name]);
657 resolve(registry[class_name]);
658 } else {
658 } else {
659 reject(new Error({
659 reject(new Error('Class '+class_name+' not found in registry '));
660 message: 'Class '+class_name+' not found in registry ',
661 registry: registry
662 }));
663 }
660 }
664 }
661 }
665 });
662 });
@@ -75,10 +75,7 define(["widgets/js/manager",
75 case 'update':
75 case 'update':
76 this.state_change = this.state_change.then(function() {
76 this.state_change = this.state_change.then(function() {
77 return that.set_state(msg.content.data.state);
77 return that.set_state(msg.content.data.state);
78 }).catch(utils.reject({
78 }).catch(utils.reject("Couldn't process update msg for model id '" + String(that.id) + "'", true));
79 message: "Couldn't process update msg",
80 model_id: that.id
81 }, true));
82 break;
79 break;
83 case 'custom':
80 case 'custom':
84 this.trigger('msg:custom', msg.content.data.content);
81 this.trigger('msg:custom', msg.content.data.content);
@@ -86,10 +83,7 define(["widgets/js/manager",
86 case 'display':
83 case 'display':
87 this.state_change = this.state_change.then(function () {
84 this.state_change = this.state_change.then(function () {
88 return that.widget_manager.display_view(msg, that);
85 return that.widget_manager.display_view(msg, that);
89 }).catch(utils.reject({
86 }).catch(utils.reject("Couldn't process display msg for model id '" + String(that.id) + "'", true));
90 message: "Couldn't process display msg",
91 model_id: that.id
92 }, true));
93 break;
87 break;
94 }
88 }
95 },
89 },
General Comments 0
You need to be logged in to leave comments. Login now