File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
ghcide/src/Development/IDE/Plugin Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ failedToParseArgs :: CommandId -- ^ command that failed to parse
77
77
failedToParseArgs (CommandId com) (PluginId pid) err arg = " Error while parsing args for " <> com <> " in plugin " <> pid <> " : " <> T. pack err <> " \n arg = " <> T. pack (show arg)
78
78
79
79
-- | Build a ResponseError and log it before returning to the caller
80
- logAndReturnError :: Recorder (WithPriority Log ) -> ErrorCode -> Text -> LSP. LspT Config IO (Either ResponseError J. Value )
80
+ logAndReturnError :: Recorder (WithPriority Log ) -> ErrorCode -> Text -> LSP. LspT Config IO (Either ResponseError a )
81
81
logAndReturnError recorder errCode msg = do
82
82
let err = ResponseError errCode msg Nothing
83
83
logWith recorder Warning $ LogPluginError err
@@ -192,10 +192,7 @@ extensiblePlugins recorder xs = mempty { P.pluginHandlers = handlers }
192
192
let fs = filter (\ (pid,_) -> pluginEnabled m pid config) fs'
193
193
-- Clients generally don't display ResponseErrors so instead we log any that we come across
194
194
case nonEmpty fs of
195
- Nothing -> do
196
- let err = ResponseError InvalidRequest (pluginNotEnabled m) Nothing
197
- logWith recorder Info $ LogPluginError err
198
- pure $ Left err
195
+ Nothing -> logAndReturnError recorder InvalidRequest (pluginNotEnabled m)
199
196
Just fs -> do
200
197
let msg e pid = " Exception in plugin " <> T. pack (show pid) <> " while processing " <> T. pack (show m) <> " : " <> T. pack (show e)
201
198
es <- runConcurrently msg (show m) fs ide params
You can’t perform that action at this time.
0 commit comments