Oscar Benjamin wrote:
In Python the original exception message plus traceback is often very informative (to a programmer!) about the problem.
That's okay, exception chaining preserves the whole traceback if you want to dig down that far.
Catching and reraising can mean that you end up crafting an error message somewhere higher up where the filename isn't known any more.
Well, the idea is to catch it some place where the filename *is* known. And when reraising, only add to the error message rather than replacing it altogether, so once the filename is in there it stays there, even if another catch-and-reraise occurs higher up. -- Greg -- https://mail.python.org/mailman/listinfo/python-list