File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
ghcide/src/Development/IDE/LSP Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -141,7 +141,12 @@ runLanguageServer options inH outH getHieDbLoc defaultConfig onConfigurationChan
141
141
logInfo (ideLogger ide) $ T. pack $ " Registering ide configuration: " <> show initConfig
142
142
registerIdeConfiguration (shakeExtras ide) initConfig
143
143
144
- _ <- flip forkFinally (const exitClientMsg) $ runWithDb dbLoc $ \ hiedb hieChan -> do
144
+ 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
145
150
putMVar dbMVar (hiedb,hieChan)
146
151
forever $ do
147
152
msg <- readChan clientMsgChan
You can’t perform that action at this time.
0 commit comments