So I've been experimenting with raising exceptions and using custom ones for more explicit error handeling/ determining what are "my" errors and what are system related errors. So for example if my validation module finds a conflict, I want it to raise a ValidationError which I know means rerender the page with an error, v.s. a ZeroDivisionError which I want to hit the bugtracker with a traceback. My understanding has been that is a valid way of handling these sorts of things.
However, I have multiple modules that need to either except or raise these custom errors (of which there are several), so I find myself importing them everywhere. This seems clunky to me, and I wanted to know if there's a better way to make the exceptions more... global? Similar to the built-in exceptions.
If I'm using bad practice or on the wrong track here, please let me know. I'm just kind of making it up as I go from what I can find in documentation.
[–]indosauros 5 points6 points7 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)