I want to annotate a traceback in routine A which is raised in B. Useful information in A is not available in B

I propose to use something like

def A(info):
    try:
        B()
    except:
        t,v,b=sys.exc_info()
        v.args = (' '.join(map(str,v.args))+', info=%r' % info,)
        raise

is this a reasonable approach?
--
Robin Becker

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to