Skip to content

Commit

Permalink
do not use finally
Browse files Browse the repository at this point in the history
  • Loading branch information
andris9 committed Nov 21, 2019
1 parent e7d40d5 commit cf8d8f2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/mbox-export.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,18 @@ async function mboxExport(auditHandler, audit) {

setImmediate(() => {
processExport()
.catch(err => {
.then(() => {
try {
outputStream.write('\n' + err.message);
outputStream.end();
} catch (err) {
//ignore
// ignore at this point
}
})
.finally(() => {
.catch(err => {
try {
outputStream.end();
outputStream.end('\n' + err.message);
} catch (err) {
// ignore at this point
//ignore
}
});
});
Expand Down

0 comments on commit cf8d8f2

Please sign in to comment.