Properly handle a cairo exception
This commit is contained in:
parent
a3081bce47
commit
abcdf07ef4
@ -36,7 +36,10 @@ class PDFParser(abstract.AbstractParser):
|
||||
|
||||
def remove_all(self) -> bool:
|
||||
if self.lightweight_cleaning is True:
|
||||
try:
|
||||
return self.__remove_all_lightweight()
|
||||
except cairo.Error as e:
|
||||
raise RuntimeError(e)
|
||||
return self.__remove_all_thorough()
|
||||
|
||||
def __remove_all_lightweight(self) -> bool:
|
||||
|
Loading…
Reference in New Issue
Block a user