[Python-Dev] Idea for avoiding exception masking
Tue, 28 Jan 2003 19:42:37 -0500
> On Tue, 28 Jan 2003, Raymond Hettinger wrote:
> > Python code has a number of cases where a higher
> > level routine traps an exception and reraises it with
> > new information and losing the lower level error
> > detail in the process.
> How about just holding on to the original exception and
> storing it as an attribute (e.g. "cause") on the new exception?
> -- ?!ng
I was just thinking in terms of the error message,
but your way is cleaner and more comprehensive.