-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
Description
Currently the error handling for the synchronous file system module API is performed via optional error callbacks that are passed as last parameter to the respective "sync" method. This approach is rather unconventional and unintuitive:
file.writeTextSync("some text", (err) => console.log(err));Rework the error handling logic for the "sync" methods to be similar to the nodejs approach with try...catch blocks:
try {
file.writeTextSync("some text");
} catch (err) {
console.log(err);
}Related to https://github.com/NativeScript/docs/issues/1111
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
rosen-vladimirov and vakrilov