From 258aa702137058968992610eb4d657036572cdf9 Mon Sep 17 00:00:00 2001 From: Jon Atkins Date: Wed, 8 May 2013 17:18:50 +0100 Subject: [PATCH] plugin booting - catch exceptions and log, rather than just crashing --- code/boot.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/code/boot.js b/code/boot.js index fcc04011..fea7aa00 100644 --- a/code/boot.js +++ b/code/boot.js @@ -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();