MCPcopy Create free account
hub / github.com/microsoft/debugpy / JsonIOError

Class JsonIOError

src/debugpy/common/messaging.py:27–47  ·  view source on GitHub ↗

Indicates that a read or write operation on JsonIOStream has failed.

Source from the content-addressed store, hash-verified

25
26
27class JsonIOError(IOError):
28 """Indicates that a read or write operation on JsonIOStream has failed."""
29
30 def __init__(self, *args, **kwargs):
31 stream = kwargs.pop("stream")
32 cause = kwargs.pop("cause", None)
33 if not len(args) and cause is not None:
34 args = [str(cause)]
35 super().__init__(*args, **kwargs)
36
37 self.stream = stream
38 """The stream that couldn't be read or written.
39
40 Set by JsonIOStream.read_json() and JsonIOStream.write_json().
41
42 JsonMessageChannel relies on this value to decide whether a NoMoreMessages
43 instance that bubbles up to the message loop is related to that loop.
44 """
45
46 self.cause = cause
47 """The underlying exception, if any."""
48
49
50class NoMoreMessages(JsonIOError, EOFError):

Callers 1

write_jsonMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…