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: don't log same BadLocationException excessively #1083

Merged
merged 1 commit into from
Aug 28, 2024

Conversation

sebthom
Copy link
Member

@sebthom sebthom commented Aug 27, 2024

The goal of this PR is to address #899 , #536 and #203 by logging BadLocationExceptions in LSPDiagnosticsToMarkers and SymbolsLabelProvider only when Platform.getDebugOption("org.eclipse.lsp4e/debug") is set to true.

@sebthom sebthom changed the title fix: log BadLocationException in LSPDiagnosticsToMarkers at debug level fix: log BadLocationException only if debug enabled Aug 27, 2024
@rubenporras
Copy link
Contributor

I prefer to have the exceptions in the log if the error happens.

Otherwise the user will still miss some feature and will not know why.

Is the error such a problem that we would like to hide it?

@sebthom
Copy link
Member Author

sebthom commented Aug 27, 2024

I guess the problem is the amount of exceptions being logged repetitively and since it has been reported several times it seems to be an annoyance to users. Also in the error log view there is the option "Activate on new error" which would frequently re-activate that view.

image

Maybe we can just lower the severity to warning or info instead of error?

@rubenporras
Copy link
Contributor

What about counting exceptions and only log the first three unless in debug mode?

I think that is a good compromise between informing the user and not bothering him

@sebthom sebthom changed the title fix: log BadLocationException only if debug enabled fix: don't log same BadLocationException excessively Aug 27, 2024
@sebthom
Copy link
Member Author

sebthom commented Aug 27, 2024

What about counting exceptions and only log the first three unless in debug mode?

I think that is a good compromise between informing the user and not bothering him

@rubenporras ok, please check my update

Copy link
Contributor

@rubenporras rubenporras left a comment

Choose a reason for hiding this comment

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

Thanks

@rubenporras rubenporras merged commit e44f107 into eclipse:main Aug 28, 2024
6 checks passed
@sebthom sebthom deleted the logDebug branch September 4, 2024 12:23
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.

2 participants