projects
/
lsp-test.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a71684d
)
Add new NoContentLengthHeader SessionException to replace raw error
author
jneira
<atreyu.bbb@gmail.com>
Tue, 9 Jul 2019 12:35:04 +0000
(14:35 +0200)
committer
jneira
<atreyu.bbb@gmail.com>
Tue, 9 Jul 2019 12:35:04 +0000
(14:35 +0200)
src/Language/Haskell/LSP/Test/Exceptions.hs
patch
|
blob
|
history
diff --git
a/src/Language/Haskell/LSP/Test/Exceptions.hs
b/src/Language/Haskell/LSP/Test/Exceptions.hs
index b1e0635e31b435b6a8e480e19b83b43fdab6802b..dd31ea3cc155d879ba5366966b04e9b4ca5a4808 100644
(file)
--- a/
src/Language/Haskell/LSP/Test/Exceptions.hs
+++ b/
src/Language/Haskell/LSP/Test/Exceptions.hs
@@
-12,6
+12,7
@@
import qualified Data.ByteString.Lazy.Char8 as B
-- | An exception that can be thrown during a 'Haskell.LSP.Test.Session.Session'
data SessionException = Timeout
-- | An exception that can be thrown during a 'Haskell.LSP.Test.Session.Session'
data SessionException = Timeout
+ | NoContentLengthHeader
| UnexpectedMessage String FromServerMessage
| ReplayOutOfOrder FromServerMessage [FromServerMessage]
| UnexpectedDiagnostics
| UnexpectedMessage String FromServerMessage
| ReplayOutOfOrder FromServerMessage [FromServerMessage]
| UnexpectedDiagnostics
@@
-24,6
+25,7
@@
instance Exception SessionException
instance Show SessionException where
show Timeout = "Timed out waiting to receive a message from the server."
instance Show SessionException where
show Timeout = "Timed out waiting to receive a message from the server."
+ show NoContentLengthHeader = "Couldn't read Content-Length header from the server."
show (UnexpectedMessage expected lastMsg) =
"Received an unexpected message from the server:\n" ++
"Was parsing: " ++ expected ++ "\n" ++
show (UnexpectedMessage expected lastMsg) =
"Received an unexpected message from the server:\n" ++
"Was parsing: " ++ expected ++ "\n" ++