fix: error responses in tests
This commit is contained in:
parent
bdd0eae625
commit
2333a3fbab
1 changed files with 5 additions and 3 deletions
|
|
@ -56,10 +56,12 @@ partial def collectDiagnostics (waitForDiagnosticsId : RequestID := 0) (target :
|
|||
let rec loop : IpcM (List (Notification PublishDiagnosticsParams)) := do
|
||||
match ←readMessage with
|
||||
| Message.response id _ =>
|
||||
if id == waitForDiagnosticsId then []
|
||||
else loop
|
||||
| Message.responseError id code msg _ =>
|
||||
if id == waitForDiagnosticsId then
|
||||
[]
|
||||
else
|
||||
loop
|
||||
throw $ userError s!"Waiting for diagnostics failed: {msg}"
|
||||
else loop
|
||||
| Message.notification "textDocument/publishDiagnostics" (some param) =>
|
||||
match fromJson? (toJson param) with
|
||||
| some diagnosticParam => ⟨"textDocument/publishDiagnostics", diagnosticParam⟩ :: (←loop)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue