Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Document change for exception handler
  • Loading branch information
gvanrossum committed Oct 4, 2022
commit 0ca502343b935365f6e0f7e477a667f0b93fc55b
9 changes: 9 additions & 0 deletions Doc/library/asyncio-eventloop.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1271,6 +1271,15 @@ Allows customizing how exceptions are handled in the event loop.
(see :meth:`call_exception_handler` documentation for details
about context).

If the handler is called on behalf of a :class:`~asyncio.Task` or
:class:`~asyncio.Handle`, it is run in the
:class:`contextvars.Context` of that task or callback handle.

.. versionchanged:: 3.12

The handler may be called in the :class:`~contextvars.Context`
of the task or handle where the exception originated.

.. method:: loop.get_exception_handler()

Return the current exception handler, or ``None`` if no custom
Expand Down