Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 2 additions & 0 deletions CHANGES/11234.doc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Clarified exceptions raised by ``WebSocketResponse.send_frame`` at al.
-- by :user:`DoctorJohn`.
24 changes: 19 additions & 5 deletions docs/web_reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1118,7 +1118,9 @@ and :ref:`aiohttp-web-signals` handlers::
:class:`str` (converted to *UTF-8* encoded bytes)
or :class:`bytes`.

:raise RuntimeError: if connections is not started or closing.
:raise RuntimeError: if the connections is not started.

:raise aiohttp.ClientConnectionResetError: if the connection is closing.

.. versionchanged:: 3.0

Expand All @@ -1133,7 +1135,9 @@ and :ref:`aiohttp-web-signals` handlers::
:class:`str` (converted to *UTF-8* encoded bytes)
or :class:`bytes`.

:raise RuntimeError: if connections is not started or closing.
:raise RuntimeError: if the connections is not started.

:raise aiohttp.ClientConnectionResetError: if the connection is closing.

.. versionchanged:: 3.0

Expand All @@ -1150,10 +1154,12 @@ and :ref:`aiohttp-web-signals` handlers::
single message,
``None`` for not overriding per-socket setting.

:raise RuntimeError: if connection is not started or closing
:raise RuntimeError: if the connection is not started.

:raise TypeError: if data is not :class:`str`

:raise aiohttp.ClientConnectionResetError: if the connection is closing.

.. versionchanged:: 3.0

The method is converted into :term:`coroutine`,
Expand All @@ -1170,11 +1176,13 @@ and :ref:`aiohttp-web-signals` handlers::
single message,
``None`` for not overriding per-socket setting.

:raise RuntimeError: if connection is not started or closing
:raise RuntimeError: if the connection is not started.

:raise TypeError: if data is not :class:`bytes`,
:class:`bytearray` or :class:`memoryview`.

:raise aiohttp.ClientConnectionResetError: if the connection is closing.

.. versionchanged:: 3.0

The method is converted into :term:`coroutine`,
Expand All @@ -1195,12 +1203,14 @@ and :ref:`aiohttp-web-signals` handlers::
returns a JSON string
(:func:`json.dumps` by default).

:raise RuntimeError: if connection is not started or closing
:raise RuntimeError: if the connection is not started.

:raise ValueError: if data is not serializable object

:raise TypeError: if value returned by ``dumps`` param is not :class:`str`

:raise aiohttp.ClientConnectionResetError: if the connection is closing.

.. versionchanged:: 3.0

The method is converted into :term:`coroutine`,
Expand Down Expand Up @@ -1230,6 +1240,10 @@ and :ref:`aiohttp-web-signals` handlers::
single message,
``None`` for not overriding per-socket setting.

:raise RuntimeError: if the connection is not started.

:raise aiohttp.ClientConnectionResetError: if the connection is closing.

.. versionadded:: 3.11

.. method:: close(*, code=WSCloseCode.OK, message=b'', drain=True)
Expand Down
Loading