Skip to main content

Module error

Module error 

Source
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§

EchoedArgument
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.
EchoedPath
A path the workspace names, shown whole, escaped and bounded.
ErrorChain
Renders an error followed by its causes, outer: cause: root, skipping a cause whose text the preceding text already contains.
RedactedText
Text known to carry no configured secret: it was redacted when built or is a fixed string.
RewrittenServerError
The raw LSP error behind a position-out-of-range rewrite, carried as the JSON-RPC data of the resulting -32602 error.
ServerSpawnFailure
Details of a single server spawn failure.
SizeExceeded
A byte count that went over its limit.
StderrExcerpt
What a failed server startup wrote to stderr, bounded and sanitized.
SymbolCandidate
One symbol a name resolved to, with enough context to tell it apart from its namesakes and to address it by position instead.

Enums§

BackgroundTask
A background task whose failure surfaces as Error::TaskFailed or is reported by its supervisor.
CmdSwitch
A switch of cmd that gives it a command string.
ConfigError
A configuration value that is invalid in the context of the entry that holds it.
Error
The main error type for mcpls-core operations.
HomeVariable
An environment variable that names the user’s home directory.
InitFailureHint
Guidance attached to an initialize failure whose likely cause is known.
InitPhase
A step of the LSP initialization handshake.
InlineFlag
The flag that gives an interpreter a program to run inline.
LaunchTrigger
What about a launcher lets the workspace choose the program that runs.
LauncherRefusal
Why a launcher lets the workspace choose the program that runs.
LongCommandName
The spelling of a long flag that gives a shell a command string.
McpErrorKind
JSON-RPC error-code classification for an Error, returned by Error::mcp_error_kind.
OperandKind
A positional operand a wrapper takes before the command.
PowerShellParameter
A PowerShell parameter that gives it a command, however abbreviated.
ResolvedItem
What untrusted-workspace mode resolved to a path that is not valid UTF-8.
RetryableErrorData
Structured data payload of a retryable JSON-RPC error.
RunnerSubcommand
A subcommand of a runner that starts a program the workspace chooses.
ShellFlag
The flag that gives a shell a command string, as the shell’s family spells it.
StartupFailure
Why a configured LSP server never registered during startup.
StdioStream
A standard stream of a spawned LSP server process.
SymbolResolutionData
Why a symbol name could not be resolved to exactly one position.
UnanalyzableLaunch
Why a launch cannot be analyzed, so untrusted mode cannot tell which program it starts.
UntrustedRefusal
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.