mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-19 15:12:51 +08:00
Handle errors when adding a service.
This commit is contained in:
parent
c96c9b00b9
commit
85dab52cf7
@ -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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user