on-internet
← Community

How to automatically check if there is any possible exceptions in Python?

Stack Overflow ·

I'm refactoring a non-trivial python project, there could be many exceptions to be thrown. sometimes it's hard to catch all of them if you don't just try...except the whole program. In order to achieve a fine-grained exception handling, I want to systematically get a list(preferably a graph) of all possible exceptions( and their types) that could be thrown in different location of execution flow. Is such a thing even[sic] possible?

Comments

Sign in or sign up to comment and upvote.

No comments yet.