Skip to content

Commit

Permalink
Handle errors when adding a service.
Browse files Browse the repository at this point in the history
  • Loading branch information
brycecurtis committed Jun 27, 2011
1 parent c96c9b0 commit 85dab52
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion framework/assets/js/phonegap.js.base
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
};

Expand Down

0 comments on commit 85dab52

Please sign in to comment.