projects
/
lsp-test.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use a SessionException instead an error, to ignore the error when server is down
[lsp-test.git]
/
src
/
Language
/
Haskell
/
LSP
/
Test
/
Decoding.hs
diff --git
a/src/Language/Haskell/LSP/Test/Decoding.hs
b/src/Language/Haskell/LSP/Test/Decoding.hs
index 27c7770ec461cdebe16a17868419b440f986081a..af91928695d73df098cb4054abaae82632d3a845 100644
(file)
--- a/
src/Language/Haskell/LSP/Test/Decoding.hs
+++ b/
src/Language/Haskell/LSP/Test/Decoding.hs
@@
-32,7
+32,7
@@
getNextMessage :: Handle -> IO B.ByteString
getNextMessage h = do
headers <- getHeaders h
case read . init <$> lookup "Content-Length" headers of
getNextMessage h = do
headers <- getHeaders h
case read . init <$> lookup "Content-Length" headers of
- Nothing ->
error "Couldn't read Content-Length header"
+ Nothing ->
throw NoContentLengthHeader
Just size -> B.hGet h size
addHeader :: B.ByteString -> B.ByteString
Just size -> B.hGet h size
addHeader :: B.ByteString -> B.ByteString