This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pagliaricci.m
Recipients asvetlov, bjs, chris.jerdonek, graingert, pagliaricci.m, yselivanov
Date 2021-10-09.13:00:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
In-reply-to <>
I'm attaching to this e-mail the code I'm referring to.
As you can see, in line 10, I re-raise the asyncio.CancelledError exception
with a message "TEST".
That message is lost, due to the reasons we've talked about.

My point is that, if we substitute that line 10, with the commented line
11, and we comment the line 10, so we raise a ValueError("TEST") exception,
as you can see, the message "TEST" is NOT LOST.
I just find this counter-intuitive, and error-prone.

AT LEAST should be very well specified in the docs.


On Sat, Oct 9, 2021 at 2:51 PM Chris Jerdonek <>

> Chris Jerdonek <> added the comment:
> > 2) Now: if I re-raise the asyncio.CancelledError as-is, I lose the
> message,
> if I call the `asyncio.Task.exception()` function.
> Re-raise asyncio.CancelledError where? (And what do you mean by
> "re-raise"?) Call asyncio.Task.exception() where? This isn't part of your
> example, so it's not clear what you mean exactly.
> ----------
> _______________________________________
> Python tracker <>
> <>
> _______________________________________
File name Uploaded pagliaricci.m, 2021-10-09.13:00:14
Date User Action Args
2021-10-09 13:00:14pagliaricci.msetrecipients: + pagliaricci.m, asvetlov, chris.jerdonek, yselivanov, graingert, bjs
2021-10-09 13:00:14pagliaricci.mlinkissue45390 messages
2021-10-09 13:00:14pagliaricci.mcreate