Log exceptions when indexing #1303#4441
Log exceptions when indexing #1303#4441fedejeanne wants to merge 1 commit intoeclipse-jdt:masterfrom
Conversation
Contributes to eclipse-jdt#1303
cf2fa08 to
3667708
Compare
| if (VERBOSE) { | ||
| trace("-> failed to recreate index for path: "+containerPathString, e); //$NON-NLS-1$ | ||
| } | ||
| Util.log(Status.warning("Failed to recreate index for path: " + containerPathString)); //$NON-NLS-1$ |
|
Would it be possible to review and merge this one too, please? @trancexpress since Andrey said he is going to be busy in the next few weeks, maybe you could take a peek? This PR is very similar to the one Andrey already merged: #4388 . |
|
@fedejeanne what is the user expected to do with the log entries? Generally the indexer runs in parallel with user operations, its possible it runs into errors due to e.g. deleted files. What does the user do with the log in that case? |
|
@trancexpress if errors occurs then:
This would give the user a heads-up and more insight as to why some things might be wrong in the views (hierarchies, searches, etc). The goal of the PR is to bring the errors to the surface without the need to activate the |
|
@trancexpress after some consideration, I decided to first try and see if these errors really don't happen that often and if they are actionable. As you pointed out, there is not much to do when an error occurs since the indexes should try to rebuild themselves anyway and the user would only be annoyed if these are only informational messages. I rolled out the tracing preference internally by adding these 2 lines in the Our centralized logs should start picking up these messages. This solves the issue for me at the moment so there is no need to change the code. Thank you for your hint, @trancexpress ! |

Similar to #4388 (but this time for the indexing of JARs/JRTs), do not rely on the
VERBOSEflag, let the exceptions come to the error log and to the UI instead for better debugging.Notice that I logged some exceptions as warnings since the operation will be retried i.e. it's recoverable.
Contributes to #1303