Skip to content
Snippets Groups Projects
Commit abcdf07e authored by Julien (jvoisin) Voisin's avatar Julien (jvoisin) Voisin
Browse files

Properly handle a cairo exception

parent a3081bce
No related branches found
No related tags found
No related merge requests found
Pipeline #166479 passed with warnings
...@@ -36,7 +36,10 @@ class PDFParser(abstract.AbstractParser): ...@@ -36,7 +36,10 @@ class PDFParser(abstract.AbstractParser):
def remove_all(self) -> bool: def remove_all(self) -> bool:
if self.lightweight_cleaning is True: if self.lightweight_cleaning is True:
try:
return self.__remove_all_lightweight() return self.__remove_all_lightweight()
except cairo.Error as e:
raise RuntimeError(e)
return self.__remove_all_thorough() return self.__remove_all_thorough()
def __remove_all_lightweight(self) -> bool: def __remove_all_lightweight(self) -> bool:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment