plugin booting - catch exceptions and log, rather than just crashing

This commit is contained in:
Jon Atkins 2013-05-08 17:18:50 +01:00
parent 13d1ff9aaa
commit 258aa70213

View File

@ -423,7 +423,13 @@ function boot() {
$('#sidebar').show();
if(window.bootPlugins)
$.each(window.bootPlugins, function(ind, ref) { ref(); });
$.each(window.bootPlugins, function(ind, ref) {
try {
ref();
} catch(err) {
console.log("error starting plugin: index "+ind+", error: "+err);
}
});
window.runOnSmartphonesAfterBoot();