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

fix: wrap didSaveFile method with try-finally block #495

Merged
merged 1 commit into from
Sep 22, 2024

Conversation

maximyurevich
Copy link
Contributor

@maximyurevich maximyurevich commented Apr 4, 2024

No description provided.

@maximyurevich maximyurevich changed the title main fix: wrap didSaveFile method with try-finally block Apr 5, 2024
@yegappan yegappan merged commit f9b776b into yegappan:main Sep 22, 2024
2 checks passed
Copy link
Contributor

@Shane-XB-Qian Shane-XB-Qian left a comment

Choose a reason for hiding this comment

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

donot understand what this PR really solved, or worse.

lspserver.didSaveFile(bnr)
# TODO: implement `catch` block
# Wrap method with `try-finally` block to solve error:
# `E716: Key not present in Dictionary: "supportsDidSave"`
Copy link
Contributor

Choose a reason for hiding this comment

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

how this would happen?

try
lspserver.didSaveFile(bnr)
finally
return
Copy link
Contributor

Choose a reason for hiding this comment

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

even it happened, just return or should continue?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I didn't dive into the entire code base, I just hid the errors that appeared during programming. Perhaps it would be worthwhile to implement the ability to hide errors using a variable.

Copy link
Contributor

Choose a reason for hiding this comment

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

though @yegappan accepted your/this PR, but i think:

  1. this didnot fix (or hid) the real err, since it perhaps was an init case, tho not sure how come that happened.
  2. and perhaps worse, since if that really happened, i thought it should continue to next lspserver vs return.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants