bellingcat / EDGAR

Tool for the retrieval of corporate and financial data from the SEC
https://colab.research.google.com/github/bellingcat/EDGAR/blob/main/notebook/Bellingcat_EDGAR_Tool.ipynb
GNU General Public License v3.0
95 stars 12 forks source link

Replace sys.exit with exceptions and handling #17

Closed GalenReich closed 1 month ago

GalenReich commented 3 months ago

At the moment, handling the first page of results not loading is done by calling sys.exit(1)

I think it would be better to raise and handle a specific exception than call sys.exit(1); if someone used the text_search class they might not expect a call to sys.exit

https://github.com/bellingcat/EDGAR/blob/685865b65ce4f9e3522250060f455e97903e706b/src/text_search.py#L478-L480

https://github.com/bellingcat/EDGAR/blob/685865b65ce4f9e3522250060f455e97903e706b/src/text_search.py#L486-L489

NauelSerraino commented 1 month ago

Hi @GalenReich I would be happy to work on it :)

GalenReich commented 1 month ago

Hero! I've assigned it to you now!