Expand description
Error types for mcpls-core.
This module defines the canonical error type for the library, following the Microsoft Rust Guidelines for error handling.
Structs§
- Echoed
Argument - A piece of configured launch text that may be shown to callers: an option name or a program name, never a value, an inline program or an assignment’s value.
- Echoed
Path - A path the workspace names, shown whole, escaped and bounded.
- Error
Chain - Renders an error followed by its causes,
outer: cause: root, skipping a cause whose text the preceding text already contains. - Redacted
Text - Text known to carry no configured secret: it was redacted when built or is a fixed string.
- Rewritten
Server Error - The raw LSP error behind a position-out-of-range rewrite, carried as the
JSON-RPC
dataof the resulting-32602error. - Server
Spawn Failure - Details of a single server spawn failure.
- Size
Exceeded - A byte count that went over its limit.
- Stderr
Excerpt - What a failed server startup wrote to stderr, bounded and sanitized.
- Symbol
Candidate - One symbol a name resolved to, with enough context to tell it apart from its namesakes and to address it by position instead.
Enums§
- Background
Task - A background task whose failure surfaces as
Error::TaskFailedor is reported by its supervisor. - CmdSwitch
- A switch of
cmdthat gives it a command string. - Config
Error - A configuration value that is invalid in the context of the entry that holds it.
- Error
- The main error type for mcpls-core operations.
- Home
Variable - An environment variable that names the user’s home directory.
- Init
Failure Hint - Guidance attached to an
initializefailure whose likely cause is known. - Init
Phase - A step of the LSP initialization handshake.
- Inline
Flag - The flag that gives an interpreter a program to run inline.
- Launch
Trigger - What about a launcher lets the workspace choose the program that runs.
- Launcher
Refusal - Why a launcher lets the workspace choose the program that runs.
- Long
Command Name - The spelling of a long flag that gives a shell a command string.
- McpError
Kind - JSON-RPC error-code classification for an
Error, returned byError::mcp_error_kind. - Operand
Kind - A positional operand a wrapper takes before the command.
- Power
Shell Parameter - A PowerShell parameter that gives it a command, however abbreviated.
- Resolved
Item - What untrusted-workspace mode resolved to a path that is not valid UTF-8.
- Retryable
Error Data - Structured
datapayload of a retryable JSON-RPC error. - Runner
Subcommand - A subcommand of a runner that starts a program the workspace chooses.
- Shell
Flag - The flag that gives a shell a command string, as the shell’s family spells it.
- Startup
Failure - Why a configured LSP server never registered during startup.
- Stdio
Stream - A standard stream of a spawned LSP server process.
- Symbol
Resolution Data - Why a symbol name could not be resolved to exactly one position.
- Unanalyzable
Launch - Why a launch cannot be analyzed, so untrusted mode cannot tell which program it starts.
- Untrusted
Refusal - Why untrusted-workspace mode refused to start a server.
Constants§
- LISTEN_
STREAMS_ EXHAUSTED_ ERROR_ CODE - Bespoke JSON-RPC code for
Error::ListenStreamsExhausted. - SERVER_
INITIALIZING_ ERROR_ CODE - Bespoke JSON-RPC code for
Error::ServerInitializing. - SERVER_
RESTARTED_ ERROR_ CODE - Bespoke JSON-RPC code for
Error::ServerRestarted. - STATELESS_
SUBSCRIPTION_ ERROR_ CODE - Bespoke JSON-RPC code for a resource subscription request rejected because it was served over rmcp’s stateless per-request HTTP path (#482).
- WORKSPACE_
INDEXING_ ERROR_ CODE - Bespoke JSON-RPC code for
Error::WorkspaceIndexing.
Type Aliases§
- Result
- A specialized Result type for mcpls-core operations.