refactor: improve error codes return from LSP client

This commit is contained in:
CJ van den Berg 2024-12-12 16:55:23 +01:00
parent ba65fece7e
commit d83d3a62bb
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
3 changed files with 11 additions and 5 deletions

View file

@ -26,7 +26,7 @@ const OutOfMemoryError = error{OutOfMemory};
const CallError = tp.CallError;
const SpawnError = (OutOfMemoryError || error{ThespianSpawnFailed});
pub const InvalidMessageError = error{ InvalidMessage, InvalidMessageField, InvalidTargetURI };
pub const StartLspError = (error{ ThespianSpawnFailed, Timeout, InvalidArgument } || LspError || OutOfMemoryError || cbor.Error);
pub const StartLspError = (error{ ThespianSpawnFailed, Timeout, InvalidLspCommand } || LspError || OutOfMemoryError || cbor.Error);
pub const LspError = (error{ NoLsp, LspFailed } || OutOfMemoryError);
pub const ClientError = (error{ClientFailed} || OutOfMemoryError);
pub const LspOrClientError = (LspError || ClientError);