Commit b79ed1b7 authored by Andrei.Kuznetsov's avatar Andrei.Kuznetsov Committed by intellij-monorepo-bot
Browse files

IDEA-312152: Exceptions happening during scanning should not interrupt...

IDEA-312152: Exceptions happening during scanning should not interrupt scanning. They should be logged and ignored.

(cherry picked from commit a56956aae8e42a7c76cdf2297811608a8494a446)

IJ-CR-102308

GitOrigin-RevId: 9b8f21db50f1f90130110722499fbe622e60911b
parent ed746751
Branches unavailable Tags unavailable
No related merge requests found
Showing with 9 additions and 0 deletions
+9 -0
......@@ -374,6 +374,15 @@ public class UnindexedFilesScanner implements MergeableQueueTask<UnindexedFilesS
provider.iterateFiles(project, collectingIterator, thisProviderDeduplicateFilter);
perProviderSink.commit();
}
catch (ProcessCanceledException pce) {
throw pce;
}
catch (Exception e) {
// CollectingIterator should skip failing files by itself. But if provider.iterateFiles cannot iterate files and throws exception,
// we want to ignore whole origin and let other origins to complete normally.
LOG.error("Error while scanning files of " + provider.getDebugName() + "\n" +
"To reindex files under this origin IDEA has to be restarted", e);
}
finally {
scanningStatistics.setNumberOfSkippedFiles(thisProviderDeduplicateFilter.getNumberOfSkippedFiles());
synchronized (allTasksFinished) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment