Skip to content

Commit

Permalink
Added error event.
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelBone committed Sep 11, 2018
1 parent 79abce4 commit 6a7f104
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions scraper.js
Expand Up @@ -102,6 +102,7 @@ function parsePdfs(database, url) {

let pdfParser = new pdf2json();
pdfParser.on("finish", () => { });
pdfParser.on("error", () => { });
pdfParser.on("pdfParser_dataError", error => { console.error(error); });
pdfParser.on("pdfParser_dataReady", pdf => {
// Convert the JSON representation of the PDF into a collection of PDF rows.
Expand Down

0 comments on commit 6a7f104

Please sign in to comment.