MCPcopy
hub / github.com/encode/starlette / WebSocketException

Class WebSocketException

starlette/exceptions.py:23–33  ·  starlette/exceptions.py::WebSocketException

Source from the content-addressed store, hash-verified

21
22
23class WebSocketException(Exception):
24 def __init__(self, code: int, reason: str | None = None) -> None:
25 self.code = code
26 self.reason = reason or class="st">""
27
28 def __str__(self) -> str:
29 return fclass="st">"{self.code}: {self.reason}"
30
31 def __repr__(self) -> str:
32 class_name = self.__class__.__name__
33 return fclass="st">"{class_name}(code={self.code!r}, reason={self.reason!r})"
34
35
36class StarletteDeprecationWarning(UserWarning):

Callers 3

test_websocket_strFunction · 0.90
test_websocket_reprFunction · 0.90

Calls

no outgoing calls

Tested by 3

test_websocket_strFunction · 0.72
test_websocket_reprFunction · 0.72