[issue18861] Problems with recursive automatic exception chaining

Nick Coghlan report at bugs.python.org
Wed Nov 13 15:46:47 CET 2013


Nick Coghlan added the comment:

So, I've been pondering the idea of traceback/frame annotations and exception trees a bit.

And what I'm wondering is if it may make sense to have the ability to annotate *frames* at runtime, and these annotations can be qualified by module names. So, for example, you might be able to write things like:

    sys.annotate_frame("codecs", "encoding", the_encoding)
    sys.annotate_frame("codecs", "decoding", the_encoding)
    sys.annotate_frame("traceback", "hide", True)
    sys.annotate_frame("traceback", "context", exc)

And then the traceback display machinery would be updated to do something useful with the annotations.

I'm not sure how ExitStack would cope with that (or other code that fakes tracebacks) but it's something to ponder.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18861>
_______________________________________


More information about the Python-bugs-list mailing list