Let's trying raising exceptions from readability not working, and catching them upstream.

This commit is contained in:
Samuel Clay 2022-07-01 12:51:41 -04:00
parent 0c23b6eeb5
commit 6dcfc2ae15

View file

@ -260,12 +260,13 @@ class Document:
else:
return cleaned_article
except Exception as e:
log.exception("error getting summary: ")
if sys.version_info[0] == 2:
from .compat.two import raise_with_traceback
else:
from .compat.three import raise_with_traceback
raise_with_traceback(Unparseable, sys.exc_info()[2], str_(e))
# log.exception("error getting summary: ")
# if sys.version_info[0] == 2:
# from .compat.two import raise_with_traceback
# else:
# from .compat.three import raise_with_traceback
# raise_with_traceback(Unparseable, sys.exc_info()[2], str_(e))
raise e
def get_article(self, candidates, best_candidate, html_partial=False):
# Now that we have the top candidate, look through its siblings for