Skip to content

Commit 43509f3

Browse files
committed
fix: clarify errors by handling more clauses
1 parent 3a4dd4a commit 43509f3

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

lib/gen_lsp/communication/stdio.ex

+9-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ defmodule GenLSP.Communication.Stdio do
55
This is the default adapter, and is the communication channel that most LSP clients expect to be able to use.
66
"""
77

8-
require Logger
9-
108
@behaviour GenLSP.Communication.Adapter
119
@separator "\r\n\r\n"
1210

@@ -43,6 +41,9 @@ defmodule GenLSP.Communication.Stdio do
4341
:eof ->
4442
:eof
4543

44+
{:error, error} ->
45+
{:error, error}
46+
4647
headers ->
4748
body =
4849
headers
@@ -59,6 +60,9 @@ defmodule GenLSP.Communication.Stdio do
5960
:eof ->
6061
:eof
6162

63+
{:error, error} ->
64+
{:error, error}
65+
6266
line ->
6367
line = String.trim(line)
6468

@@ -81,6 +85,9 @@ defmodule GenLSP.Communication.Stdio do
8185
:eof ->
8286
:eof
8387

88+
{:error, error} ->
89+
{:error, error}
90+
8491
payload ->
8592
payload
8693
end

0 commit comments

Comments
 (0)