MCPcopy Index your code
hub / github.com/encode/starlette / WebSocketException

Class WebSocketException

starlette/exceptions.py:23–33  ·  view source on GitHub ↗

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 ""
27
28 def __str__(self) -> str:
29 return f"{self.code}: {self.reason}"
30
31 def __repr__(self) -> str:
32 class_name = self.__class__.__name__
33 return f"{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