Adding In Exceptions
taylorjdawson opened this issue · 1 comments
taylorjdawson commented
py-etherscan-api/etherscan/client.py
Lines 78 to 99 in a36885b
I think it would be a good idea to throw exceptions instead of printing error messages and then exiting. For instance, if the user was to loop over a list of addresses to check the balance but there were some invalid addresses in the list, as of now, the api would break the loop. Throwing exceptions will enable the user to catch and handle the exceptions themselves.
AndreMiras commented
I second this, a library should not make exit in the middle of the code, but let the application using the library handling it.
Here's a pull request that solves it.
#23