pub enum Error {
Show 25 variants
LspInitFailed {
message: String,
},
LspServerError {
code: i32,
message: String,
},
McpServer(String),
DocumentNotFound(PathBuf),
NoServerForLanguage(String),
NoServerConfigured,
Config(String),
ConfigNotFound(PathBuf),
InvalidConfig(String),
Io(Error),
Json(Error),
Toml(Error),
Transport(String),
Timeout(u64),
Shutdown,
ServerSpawnFailed {
command: String,
source: Error,
},
LspProtocolError(String),
InvalidUri(String),
EncodingError(String),
ServerTerminated,
InvalidToolParams(String),
FileIo {
path: PathBuf,
source: Error,
},
PathOutsideWorkspace(PathBuf),
DocumentLimitExceeded {
current: usize,
max: usize,
},
FileSizeLimitExceeded {
size: u64,
max: u64,
},
}Expand description
The main error type for mcpls-core operations.
Variants§
LspInitFailed
LSP server failed to initialize.
LspServerError
LSP server returned an error response.
McpServer(String)
MCP server error.
DocumentNotFound(PathBuf)
Document was not found or could not be opened.
NoServerForLanguage(String)
No LSP server configured for the given language.
NoServerConfigured
No LSP server is currently configured.
Config(String)
Configuration error.
ConfigNotFound(PathBuf)
Configuration file not found.
InvalidConfig(String)
Invalid configuration format.
Io(Error)
I/O error.
Json(Error)
JSON serialization/deserialization error.
Toml(Error)
TOML parsing error.
Transport(String)
LSP client transport error.
Timeout(u64)
Request timeout.
Shutdown
Server shutdown requested.
ServerSpawnFailed
LSP server failed to spawn.
LspProtocolError(String)
LSP protocol error during message parsing.
InvalidUri(String)
Invalid URI format.
EncodingError(String)
Position encoding error.
ServerTerminated
Server process terminated unexpectedly.
InvalidToolParams(String)
Invalid tool parameters provided.
FileIo
File I/O error occurred.
PathOutsideWorkspace(PathBuf)
Path is outside allowed workspace boundaries.
DocumentLimitExceeded
Document limit exceeded.
FileSizeLimitExceeded
File size limit exceeded.