Don't throw Errors with Objects as the message/

This commit is contained in:
Jonathan Frederic 2014-11-04 12:28:51 -08:00
parent 17108fed3b
commit fed878fed9
2 changed files with 3 additions and 12 deletions

View File

@ -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 '));
}
}
});

View File

@ -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;
}
},