Message369451
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 |
|
Date |
User |
Action |
Args |
2020-05-20 13:08:01 | chris.jerdonek | set | recipients:
+ chris.jerdonek, asvetlov, yselivanov, eamanu, aeros, carltongibson, felixxm |
2020-05-20 13:08:01 | chris.jerdonek | set | messageid: <1589980081.74.0.0887917604879.issue40696@roundup.psfhosted.org> |
2020-05-20 13:08:01 | chris.jerdonek | link | issue40696 messages |
2020-05-20 13:08:01 | chris.jerdonek | create | |
|