Skip to content

Commit

Permalink
Catch errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jlaasonen committed Mar 11, 2019
1 parent 98261ec commit 89ac691
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/countAndSaveHits.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ const saveHits = require('./saveHits')
module.exports = async function countAndSaveHits (directory, uri, db) {
const hits = extractFromDir(directory)
await saveHits(hits, uri, db)
console.log('Done!')
.then(() => console.log('Done!'))
.catch(console.error)
}

0 comments on commit 89ac691

Please sign in to comment.