Message403531
Chris,
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.
Regards,
M.
On Sat, Oct 9, 2021 at 2:51 PM Chris Jerdonek <report@bugs.python.org>
wrote:
>
> Chris Jerdonek <chris.jerdonek@gmail.com> 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 <report@bugs.python.org>
> <https://bugs.python.org/issue45390>
> _______________________________________
> |
File name |
Uploaded |
task_bug.py
|
pagliaricci.m,
2021-10-09.13:00:14
|
|
Date |
User |
Action |
Args |
2021-10-09 13:00:14 | pagliaricci.m | set | recipients:
+ pagliaricci.m, asvetlov, chris.jerdonek, yselivanov, graingert, bjs |
2021-10-09 13:00:14 | pagliaricci.m | link | issue45390 messages |
2021-10-09 13:00:14 | pagliaricci.m | create | |
|