Skip to content

Commit

Permalink
perf(plugins): remove useless catchs rethrowing errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Fdawgs committed Jul 15, 2022
1 parent 4ba4978 commit 40c84a8
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 14 deletions.
4 changes: 1 addition & 3 deletions src/plugins/embed-html-images/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ async function plugin(server, options) {
)
);
})
).catch((err) => {
throw err;
});
);

return dom.serialize();
}
Expand Down
5 changes: 0 additions & 5 deletions src/plugins/pdf-to-txt/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,11 +147,6 @@ async function plugin(server, options) {
.addJob("recognize", file)
.then((result) => result?.data?.text)
)
).catch(
/* istanbul ignore next: unable to test unknown errors */
(err) => {
throw err;
}
);

req.conversionResults.body = results.join(" ");
Expand Down
7 changes: 1 addition & 6 deletions src/plugins/tidy-html/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,7 @@ async function plugin(server) {
sortAttributes: "alpha",
};

const results = await tidyP(parsedHtml, config).catch(
/* istanbul ignore next: unable to test unknown errors */
(err) => {
throw err;
}
);
const results = await tidyP(parsedHtml, config);
return results;
}

Expand Down

0 comments on commit 40c84a8

Please sign in to comment.