Skip to content

Commit

Permalink
Improve diagnostic message
Browse files Browse the repository at this point in the history
  • Loading branch information
pepeiborra committed Feb 21, 2021
1 parent 30645d3 commit 3f9de5f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ghcide/src/Development/IDE/Plugin/HLS.hs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,9 @@ extensiblePlugins defaultConfig xs = Plugin mempty handlers
let fs = filter (\(pid,_) -> pluginEnabled m pid config) fs'
case nonEmpty fs of
Nothing -> pure $ Left $ ResponseError InvalidRequest
("No plugin enabled for " <> T.pack (show m) <> ", available: " <> T.pack (show $ map fst fs))
("No plugin enabled for " <> T.pack (show m) <>
", available: " <> T.pack (show $ map (\(x@(PluginId p),_) -> (p, x `elem` map fst fs)) xs) <>
", config" <> T.pack (show config))
Nothing
Just fs -> do
let msg e pid = "Exception in plugin " <> T.pack (show pid) <> "while processing " <> T.pack (show m) <> ": " <> T.pack (show e)
Expand Down

0 comments on commit 3f9de5f

Please sign in to comment.