Browse Source

exit if error reading

fix-broken-scrape
Jørgen Lien Sellæg 6 years ago
parent
commit
692658e3a8
  1. 5
      src/logic.js

5
src/logic.js

@ -142,7 +142,10 @@ const read_previous_events = (path) => {
return fs
.readFile(path, { encoding: 'utf-8' })
.then((content) => JSON.parse(content))
.catch(console.error);
.catch((error) => {
console.error(error);
process.exit(1);
});
}
}
return Promise.resolve([]);

Loading…
Cancel
Save