Handle errors when adding a service.

This commit is contained in:
Bryce Curtis 2011-06-27 13:49:24 -05:00
parent c96c9b00b9
commit 85dab52cf7

View File

@ -936,7 +936,11 @@ PhoneGap.includeJavascript = function(jsfile, successCallback) {
*/ */
var PluginManager = { var PluginManager = {
addService: function(serviceType, className) { addService: function(serviceType, className) {
navigator.app.addService(serviceType, className); try {
navigator.app.addService(serviceType, className);
} catch (e) {
console.log("Error adding service "+serviceType+": "+e);
}
} }
}; };