From 85dab52cf75dedadedee5cba9f881cefeca7961c Mon Sep 17 00:00:00 2001 From: Bryce Curtis Date: Mon, 27 Jun 2011 13:49:24 -0500 Subject: [PATCH] Handle errors when adding a service. --- framework/assets/js/phonegap.js.base | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/framework/assets/js/phonegap.js.base b/framework/assets/js/phonegap.js.base index d1daa555..a1e8fe33 100755 --- a/framework/assets/js/phonegap.js.base +++ b/framework/assets/js/phonegap.js.base @@ -936,7 +936,11 @@ PhoneGap.includeJavascript = function(jsfile, successCallback) { */ var PluginManager = { addService: function(serviceType, className) { - navigator.app.addService(serviceType, className); + try { + navigator.app.addService(serviceType, className); + } catch (e) { + console.log("Error adding service "+serviceType+": "+e); + } } };