Skip to content

Commit

Permalink
error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
takanakahiko committed Nov 6, 2023
1 parent 6ab493d commit 559f177
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions csv2rdf/csv2rdf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,10 @@ export default class {
writer.addQuads(this.store.getQuads(null, null, null, null))
writer.end((error, result) => {
if(error) reject()
fs.writeFileSync(path, result)
resolve()
fs.writeFile(path, result, err => {
if(err) reject(err)
else resolve()
})
})
})
}
Expand Down

0 comments on commit 559f177

Please sign in to comment.