Author chris.jerdonek
Recipients aeros, asvetlov, carltongibson, chris.jerdonek, eamanu, felixxm, yselivanov
Date 2020-05-20.13:08:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1589980081.74.0.0887917604879.issue40696@roundup.psfhosted.org>
In-reply-to
Content
The Django details might not matter so much at this point, but to add to something I said above: It might not only be process_exception_by_middleware() as I mentioned, but also asgiref's sync_to_async() function. In that function, you can see an already active exception being re-raised (here the exc_info comes from sys.exc_info()):

# If we have an exception, run the function inside the except block
# after raising it so exc_info is correctly populated.
if exc_info[1]:
    try:
        raise exc_info[1]
    except:
        return func(*args, **kwargs)
else:
    return func(*args, **kwargs)

https://github.com/django/asgiref/blob/edd0570a4f6e46f0948afa5ef197a192bb95b7b7/asgiref/sync.py#L306-L314
History
Date User Action Args
2020-05-20 13:08:01chris.jerdoneksetrecipients: + chris.jerdonek, asvetlov, yselivanov, eamanu, aeros, carltongibson, felixxm
2020-05-20 13:08:01chris.jerdoneksetmessageid: <1589980081.74.0.0887917604879.issue40696@roundup.psfhosted.org>
2020-05-20 13:08:01chris.jerdoneklinkissue40696 messages
2020-05-20 13:08:01chris.jerdonekcreate