python-substack icon indicating copy to clipboard operation
python-substack copied to clipboard

Exception types not subclassing a single SubstackException

Open rgeronimi opened this issue 1 year ago • 0 comments

All the library's exceptions inherit directly from Python's Exception which prevents from catching them in one go (exclusive of any other kind of exception) : one has to list explicitly each of these exception classes in one's exceptclause. Also, if some day another exception type is added by the library, it will escape this try...except piece of code.

This is not a bug, but an enhancement: having all substack exception types subclass a SubstackException(itself suclassing Exception) would make it easier for client code.

rgeronimi avatar Mar 01 '24 08:03 rgeronimi