fix(Cache): ignore "Throwable: File is not valid" at FileViewProvider.findElementAt
This commit is contained in:
@@ -79,7 +79,7 @@ public class LineEndCacheUtils {
|
||||
AppExecutorUtil.getAppScheduledExecutorService().scheduleWithFixedDelay(() -> {
|
||||
try {
|
||||
cacheUpdate();
|
||||
} catch (Exception e) {
|
||||
} catch (Throwable e) {
|
||||
LOG.info("LineEndCacheUtils checkScheduleAndInit catch Throwable but log to record.", e);
|
||||
}
|
||||
}, 0L, 1L, TimeUnit.SECONDS);
|
||||
@@ -130,15 +130,18 @@ public class LineEndCacheUtils {
|
||||
lineCache.updated();
|
||||
} catch (ProcessCanceledException ignore) {
|
||||
// ignore
|
||||
} catch (Exception e) {
|
||||
LOG.info("LineEndCacheUtils lineMap.forEach catch Throwable but log to record.", e);
|
||||
} catch (Throwable e) {
|
||||
@Nullable String msg = e.getMessage();
|
||||
if (msg == null || !msg.contains("File is not valid")) {
|
||||
LOG.info("LineEndCacheUtils lineMap.forEach catch Throwable but log to record.", e);
|
||||
}
|
||||
}
|
||||
}).inSmartMode(project).executeSynchronously();
|
||||
}));
|
||||
} catch (IllegalStateException ignore) {
|
||||
// ignore inSmartMode(project) throw:
|
||||
// @NotNull method com/intellij/openapi/project/impl/ProjectImpl.getEarlyDisposable must not return null
|
||||
} catch (Exception e) {
|
||||
} catch (Throwable e) {
|
||||
LOG.info("LineEndCacheUtils cache.forEach catch Throwable but log to record.", e);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -54,7 +54,7 @@ public class TreeCacheUtils {
|
||||
AppExecutorUtil.getAppScheduledExecutorService().scheduleWithFixedDelay(() -> {
|
||||
try {
|
||||
cacheUpdate();
|
||||
} catch (Exception e) {
|
||||
} catch (Throwable e) {
|
||||
LOG.info("TreeCacheUtils checkScheduleAndInit catch Throwable but log to record.", e);
|
||||
}
|
||||
}, 0L, 1L, TimeUnit.SECONDS);
|
||||
@@ -81,7 +81,7 @@ public class TreeCacheUtils {
|
||||
treeCache.needUpdate = false;
|
||||
} catch (ProcessCanceledException ignore) {
|
||||
// ignore
|
||||
} catch (Exception e) {
|
||||
} catch (Throwable e) {
|
||||
LOG.info("TreeCacheUtils nodeCache.forEach catch Throwable but log to record.", e);
|
||||
}
|
||||
}).inSmartMode(project).executeSynchronously();
|
||||
@@ -90,7 +90,7 @@ public class TreeCacheUtils {
|
||||
} catch (IllegalStateException ignore) {
|
||||
// ignore inSmartMode(project) throw:
|
||||
// @NotNull method com/intellij/openapi/project/impl/ProjectImpl.getEarlyDisposable must not return null
|
||||
} catch (Exception e) {
|
||||
} catch (Throwable e) {
|
||||
LOG.info("TreeCacheUtils cache.forEach catch Throwable but log to record.", e);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user