feat: enforce tagged error messages
This commit is contained in:
parent
cf80b5c470
commit
b30440ec26
31 changed files with 466 additions and 47 deletions
|
|
@ -29,7 +29,11 @@ export type Diagnostic = VSCodeDiagnostic
|
|||
export class InitializeError extends Schema.TaggedErrorClass<InitializeError>()("LSPInitializeError", {
|
||||
serverID: Schema.String,
|
||||
cause: Schema.optional(Schema.Defect()),
|
||||
}) {}
|
||||
}) {
|
||||
override get message() {
|
||||
return `Failed to initialize LSP server: ${this.serverID}`
|
||||
}
|
||||
}
|
||||
|
||||
type DocumentDiagnosticReport = {
|
||||
items?: Diagnostic[]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue