mirror of
https://gitee.com/shuto/cordova-plugin-file-opener2.git
synced 2025-01-31 12:02:49 +08:00
Merge pull request #235 from Eeems/Eeems-patch-1
Fix problem with errors not throwing the error callback in windows.
This commit is contained in:
commit
ab3da281c6
@ -75,11 +75,15 @@
|
|||||||
getFile(path).then(function (file) {
|
getFile(path).then(function (file) {
|
||||||
var options = new Windows.System.LauncherOptions();
|
var options = new Windows.System.LauncherOptions();
|
||||||
|
|
||||||
Windows.System.Launcher.launchFileAsync(file, options).then(function (success) {
|
try{
|
||||||
successCallback();
|
Windows.System.Launcher.launchFileAsync(file, options).then(function (success) {
|
||||||
}, function (error) {
|
successCallback();
|
||||||
errorCallback(error);
|
}, function (error) {
|
||||||
});
|
errorCallback(error);
|
||||||
|
});
|
||||||
|
}catch(error){
|
||||||
|
errorCallback(error);
|
||||||
|
}
|
||||||
|
|
||||||
}, function (error) {
|
}, function (error) {
|
||||||
console.log("Error while opening the file: "+error);
|
console.log("Error while opening the file: "+error);
|
||||||
|
Loading…
Reference in New Issue
Block a user