MCPcopy Create free account
hub / github.com/FSoft-AI4Code/HyperAgent / Error

Class Error

src/hyperagent/multilspy/lsp_protocol_handler/server.py:62–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60
61
62class Error(Exception):
63 def __init__(self, code: ErrorCodes, message: str) -> None:
64 super().__init__(message)
65 self.code = code
66
67 def to_lsp(self) -> StringDict:
68 return {"code": self.code, "message": super().__str__()}
69
70 @classmethod
71 def from_lsp(cls, d: StringDict) -> "Error":
72 return Error(d["code"], d["message"])
73
74 def __str__(self) -> str:
75 return f"{super().__str__()} ({self.code})"
76
77
78def make_response(request_id: Any, params: PayloadLike) -> StringDict:

Callers 14

from_lspMethod · 0.85
_response_handlerMethod · 0.85
_request_handlerMethod · 0.85
nFunction · 0.85
BFunction · 0.85
zFunction · 0.85
highlight.min.jsFile · 0.85
QFunction · 0.85
yFunction · 0.85
fFunction · 0.85
oFunction · 0.85
showdown.min.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected