You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 19, 2024. It is now read-only.
Reprising your sample and introducing an obvious mistake shows that errors don't seem to escape promise handlers:
var uwp = require('uwp');
uwp.projectNamespace("Windows");
Windows.Storage.KnownFolders.documentsLibrary.createFileAsync(
"sample.dat", Windows.Storage.CreationCollisionOption.replaceExisting)
.done(
function (file) {
undefinedFunc();
},
function (error) {
undefinedFunc();
}
);
Running this shows no error, it just runs eternally because uwp.close() is never called. It makes it hard to detect errors, especially programming ones.
I read about WinJS.promise.onerror, but I'm not sure how it relates to the uwp module. Any pointers?