Skip to content
This repository has been archived by the owner on Sep 26, 2023. It is now read-only.

Commit

Permalink
Handle errors
Browse files Browse the repository at this point in the history
  • Loading branch information
adityapk00 committed May 11, 2020
1 parent 0c3c8d6 commit cf25e03
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/components/Sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,9 @@ class Sidebar extends PureComponent<Props, State> {

const header = [`UnixTime, Date, Txid, Type, Amount, Address, Memo`];

const err = await fs.promises.writeFile(save.filePath, header.concat(rows).join('\n'));
if (err) {
try {
await fs.promises.writeFile(save.filePath, header.concat(rows).join('\n'));
} catch (err) {
openErrorModal('Error Exporting Transactions', `${err}`);
}
}
Expand Down

0 comments on commit cf25e03

Please sign in to comment.