freedomofpress / dangerzone

Take potentially dangerous PDFs, office documents, or images and convert them to safe PDFs
https://dangerzone.rocks/
GNU Affero General Public License v3.0
3.58k stars 168 forks source link

added try excepts for unhandled exceptions #916

Closed amnak613 closed 2 weeks ago

amnak613 commented 3 weeks ago

Description

-what: added a try catch to the areas in the code mentioned in the pr -why: will help any unhandled errors that are being swallowed within the code

Test Case

Closes #776

amnak613 commented 2 weeks ago

@apyrgio All tests are passing and was able to resolve some of the linter errors. I'm having some issues trying to figure out how to get rid of the last lint error on test_cli.py

apyrgio commented 2 weeks ago

Thanks a lot for the changes @amnak613. I agree with @almet, with some minimal changes the PR will be good to merge. If you want to, we can make those ourselves and just merge the PR.

amnak613 commented 2 weeks ago

@apyrgio @almet Updated and added changes once the pr has all the approvals will merge

apyrgio commented 2 weeks ago

Squashed the commits and verified that the CI passed when the branch was last updated (now the CI fails, but that's due to a CircleCI brown-out). Thanks for the changes @amnak613.