Skip to content

Commit b42a65c

Browse files
committed
Document legacy exceptions in their own section.
This change has the side effect of dropping the WebSocketProtocolError exception from the list. It was documented as an alias of ProtocolError as a side effect of using the automodule directive. Eventually it will get deprecated with the rest of the legacy module so potential users will be aware.
1 parent 0a7a71e commit b42a65c

File tree

1 file changed

+52
-1
lines changed

1 file changed

+52
-1
lines changed

docs/reference/exceptions.rst

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,56 @@ Exceptions
22
==========
33

44
.. automodule:: websockets.exceptions
5-
:members:
65

6+
.. autoexception:: WebSocketException
7+
8+
.. autoexception:: ConnectionClosed
9+
10+
.. autoexception:: ConnectionClosedError
11+
12+
.. autoexception:: ConnectionClosedOK
13+
14+
.. autoexception:: InvalidHandshake
15+
16+
.. autoexception:: SecurityError
17+
18+
.. autoexception:: InvalidHeader
19+
20+
.. autoexception:: InvalidHeaderFormat
21+
22+
.. autoexception:: InvalidHeaderValue
23+
24+
.. autoexception:: InvalidOrigin
25+
26+
.. autoexception:: InvalidUpgrade
27+
28+
.. autoexception:: InvalidStatus
29+
30+
.. autoexception:: NegotiationError
31+
32+
.. autoexception:: DuplicateParameter
33+
34+
.. autoexception:: InvalidParameterName
35+
36+
.. autoexception:: InvalidParameterValue
37+
38+
.. autoexception:: InvalidState
39+
40+
.. autoexception:: InvalidURI
41+
42+
.. autoexception:: PayloadTooBig
43+
44+
.. autoexception:: ProtocolError
45+
46+
Legacy exceptions
47+
-----------------
48+
49+
These exceptions are only used by the legacy :mod:`asyncio` implementation.
50+
51+
.. autoexception:: InvalidMessage
52+
53+
.. autoexception:: InvalidStatusCode
54+
55+
.. autoexception:: AbortHandshake
56+
57+
.. autoexception:: RedirectHandshake

0 commit comments

Comments
 (0)