On Fri, Sep 25, 2020 at 6:14 PM Sergio Fenoll
I see what you mean now, and I agree. But surely there's a fairly big overlap between "exceptions I expect to raise" (from the POV of the callee) and "exceptions I can handle" (from the POV of the caller). Wouldn't it still be useful to have the first part (exceptions I expect to raise) defined in the code (i.e., via some kind of annotation) in such a way that makes it easier for the caller to handle the exceptions they want to catch?
Or, in your opinion, should the callee not even have a notion of "exceptions I expect to raise"?
There's the shallow "exceptions that I expect to raise", which is those explicitly listed within the function as raise statements; but that's not the whole story, since exceptions can be raised by anything that the function calls. So, no, I don't think the callee should have a notion of "exceptions that I or anyone I call might raise". ChrisA