Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various PluginError PR suggestions I missed earlier #3737

Merged
merged 34 commits into from Jul 31, 2023

Conversation

joyfulmantis
Copy link
Collaborator

No description provided.

@@ -80,10 +81,17 @@ prettyResponseError err = errorCode <> ":" <+> errorBody
errorCode = pretty $ show $ err ^. L.code
errorBody = pretty $ err ^. L.message

pluginNotEnabled :: SMethod m -> [(PluginId, b, a)] -> Text
pluginNotEnabled :: SMethod m -> [PluginId] -> Text
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this just be inlined into the function below now?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, good catch!

(first (toResponseError . (p,)) <$> runExceptT (f ide a)) `catchAny` -- See Note [Exception handling in plugins]
(\e -> logAndReturnError' recorder (InR ErrorCodes_InternalError) (ExceptionInPlugin p (Some SMethod_WorkspaceApplyEdit) e))
res <- runExceptT (f ide a) `catchAny` -- See Note [Exception handling in plugins]
(\e -> pure $ Left $ PluginInternalError (exceptionInPlugin p SMethod_WorkspaceExecuteCommand e))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this method? And it was different before??

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because that's it's actually method, see line 171. WorkspaceApplyEdit before was an error, either autocomplete typo, brain fog, or sloppy mistake on my part.

@joyfulmantis joyfulmantis enabled auto-merge (squash) July 31, 2023 20:37
@joyfulmantis joyfulmantis added the merge me Label to trigger pull request merge label Jul 31, 2023
@joyfulmantis joyfulmantis merged commit ec1e6c1 into haskell:master Jul 31, 2023
43 of 46 checks passed
@fendor fendor mentioned this pull request Aug 8, 2023
19 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge me Label to trigger pull request merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants