• Jeremy Hylton's avatar
    Fix several bugs in handling of exceptions with trace function enabled. · 9263f579
    Jeremy Hylton yazdı
    If the callback raised an exception but did not set curexc_traceback,
    the trace function was called with PyTrace_RETURN.  That is, the trace
    function was called with an exception set.  The main loop detected the
    exception when the trace function returned; it complained and disabled
    tracing.
    
    Fix the logic error so that PyTrace_RETURN only occurs if the callback
    returned normally.
    
    The trace function must be called for exceptions, too.  So we had
    to add new functionality to call with PyTrace_EXCEPTION.  (Leads to a
    rather ugly ifdef / else block that contains only a '}'.)
    
    Reverse the logic and name of NOFIX_TRACE to FIX_TRACE.
    
    Joint work with Fred.
    9263f579
pyexpat.c 58.8 KB