We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 80662f2 commit 5217a04Copy full SHA for 5217a04
ghcide/src/Development/IDE/LSP/LanguageServer.hs
@@ -141,7 +141,12 @@ runLanguageServer options inH outH getHieDbLoc defaultConfig onConfigurationChan
141
logInfo (ideLogger ide) $ T.pack $ "Registering ide configuration: " <> show initConfig
142
registerIdeConfiguration (shakeExtras ide) initConfig
143
144
- _ <- flip forkFinally (const exitClientMsg) $ runWithDb dbLoc $ \hiedb hieChan -> do
+ let handleServerException (Left e) = do
145
+ logError (ideLogger ide) $
146
+ T.pack $ "Fatal error in server thread: " <> show e
147
+ exitClientMsg
148
+ handleServerException _ = pure ()
149
+ _ <- flip forkFinally handleServerException $ runWithDb dbLoc $ \hiedb hieChan -> do
150
putMVar dbMVar (hiedb,hieChan)
151
forever $ do
152
msg <- readChan clientMsgChan
0 commit comments