[Python-Dev] Traceback problem
Kevin Jacobs
jacobs@penguin.theopalgroup.com
Tue, 25 Feb 2003 19:42:21 -0500 (EST)
On Wed, 26 Feb 2003, Christian Tismer wrote:
> >>p.s.: I would probably have done the exception saving
> >>in the caller's frame, where it belongs, IMHO.
> >
> > I'm going to see if this is feasible. The current method is almost
> > certainly more efficient, but seems very backwards.
>
> No, I didn't refer to your code, but just to the
> implementation of (re)set_exc_info.
Actually, we're on the same page.
> I would have understood this much easier, if the saved exception were
> saved in the caller's frame. I'm not proposing a change, but maybe a
> comment, why this must be saved. Yes, probably it is most efficient to do
> it as it is. (Although functions called in an exception context are
> probably not the normal case which needs to be optimal).
Exactly. This is why I'm fairly certain that nobody looks at the
frame.f_exc_* values, since they make no sense in the context of that frame.
It should be trivial to dereference the traceback to find the generating
frame and stow the values there.
-Kevin
--
--
Kevin Jacobs
The OPAL Group - Enterprise Systems Architect
Voice: (216) 986-0710 x 19 E-mail: jacobs@theopalgroup.com
Fax: (216) 986-0714 WWW: http://www.theopalgroup.com