Christian Theune wrote:
Hi,
somehow there is a mixup between using __traceback_supplement__ and
__traceback_info__.
In Zope 2, I'm used to use __traceback_info__. In Zope 3 it seems like
the exception formatters use __traceback_supplement__. However, quite
some code in Zope 3.2 uses __traceback_info__ still, and only a few
places (security checkers) use __traceback_supplement__.
Actually, Zope 2 has both forms as well. We use it primarily to tell
ZPT authors which page template broke and where.
__traceback_info__ is for arbitrary information.
repr(__traceback_info__) gets dumped to the traceback.
__traceback_supplement__ is more structured. It should be a tuple. The
first item of the tuple is a callable that produces an object that
implements ITracebackSupplement, and the rest of the tuple contains
arguments to pass to the factory. The traceback formatter makes an
effort to clearly present the information provided by the
ITracebackSupplement.
I just added this explanation to zope.exceptions.interfaces. Other than
the excessive length of the name __traceback_supplement__, I like the
way the system works.
Shane
_______________________________________________
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com