Closed nodet closed 2 years ago
According to that guide, dowml
should systematically catch any exception coming from a library it uses and turn them into its own exceptions using
raise MyOwnException(...) from ex
Should we systematically catch any exception coming from ibm-watson-machine-learning and re-raise our own without even thinking about it? Considering that dowml
would have nothing to add to the original exception, and given how much work this entails, I really don't think there is any benefit in this. This may change in the future, of course...
The example of Tooz is interesting... Indeed, when implementing some code that uses different libraries to do similar work depending on some conditions, it makes perfect sense that the user's code should not have to care about what exactly these conditions were, and what library was used underneath.
https://julien.danjou.info/python-exceptions-guide/