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:
Aaron Faber 2018-12-11 16:54:36 +00:00 committed by GitHub
commit ab3da281c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -75,11 +75,15 @@
getFile(path).then(function (file) {
var options = new Windows.System.LauncherOptions();
try{
Windows.System.Launcher.launchFileAsync(file, options).then(function (success) {
successCallback();
}, function (error) {
errorCallback(error);
});
}catch(error){
errorCallback(error);
}
}, function (error) {
console.log("Error while opening the file: "+error);