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(() -> {
|
AppExecutorUtil.getAppScheduledExecutorService().scheduleWithFixedDelay(() -> {
|
||||||
try {
|
try {
|
||||||
cacheUpdate();
|
cacheUpdate();
|
||||||
} catch (Exception e) {
|
} catch (Throwable e) {
|
||||||
LOG.info("LineEndCacheUtils checkScheduleAndInit catch Throwable but log to record.", e);
|
LOG.info("LineEndCacheUtils checkScheduleAndInit catch Throwable but log to record.", e);
|
||||||
}
|
}
|
||||||
}, 0L, 1L, TimeUnit.SECONDS);
|
}, 0L, 1L, TimeUnit.SECONDS);
|
||||||
@@ -130,15 +130,18 @@ public class LineEndCacheUtils {
|
|||||||
lineCache.updated();
|
lineCache.updated();
|
||||||
} catch (ProcessCanceledException ignore) {
|
} catch (ProcessCanceledException ignore) {
|
||||||
// ignore
|
// ignore
|
||||||
} catch (Exception e) {
|
} catch (Throwable e) {
|
||||||
LOG.info("LineEndCacheUtils lineMap.forEach catch Throwable but log to record.", 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();
|
}).inSmartMode(project).executeSynchronously();
|
||||||
}));
|
}));
|
||||||
} catch (IllegalStateException ignore) {
|
} catch (IllegalStateException ignore) {
|
||||||
// ignore inSmartMode(project) throw:
|
// ignore inSmartMode(project) throw:
|
||||||
// @NotNull method com/intellij/openapi/project/impl/ProjectImpl.getEarlyDisposable must not return null
|
// @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);
|
LOG.info("LineEndCacheUtils cache.forEach catch Throwable but log to record.", e);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ public class TreeCacheUtils {
|
|||||||
AppExecutorUtil.getAppScheduledExecutorService().scheduleWithFixedDelay(() -> {
|
AppExecutorUtil.getAppScheduledExecutorService().scheduleWithFixedDelay(() -> {
|
||||||
try {
|
try {
|
||||||
cacheUpdate();
|
cacheUpdate();
|
||||||
} catch (Exception e) {
|
} catch (Throwable e) {
|
||||||
LOG.info("TreeCacheUtils checkScheduleAndInit catch Throwable but log to record.", e);
|
LOG.info("TreeCacheUtils checkScheduleAndInit catch Throwable but log to record.", e);
|
||||||
}
|
}
|
||||||
}, 0L, 1L, TimeUnit.SECONDS);
|
}, 0L, 1L, TimeUnit.SECONDS);
|
||||||
@@ -81,7 +81,7 @@ public class TreeCacheUtils {
|
|||||||
treeCache.needUpdate = false;
|
treeCache.needUpdate = false;
|
||||||
} catch (ProcessCanceledException ignore) {
|
} catch (ProcessCanceledException ignore) {
|
||||||
// ignore
|
// ignore
|
||||||
} catch (Exception e) {
|
} catch (Throwable e) {
|
||||||
LOG.info("TreeCacheUtils nodeCache.forEach catch Throwable but log to record.", e);
|
LOG.info("TreeCacheUtils nodeCache.forEach catch Throwable but log to record.", e);
|
||||||
}
|
}
|
||||||
}).inSmartMode(project).executeSynchronously();
|
}).inSmartMode(project).executeSynchronously();
|
||||||
@@ -90,7 +90,7 @@ public class TreeCacheUtils {
|
|||||||
} catch (IllegalStateException ignore) {
|
} catch (IllegalStateException ignore) {
|
||||||
// ignore inSmartMode(project) throw:
|
// ignore inSmartMode(project) throw:
|
||||||
// @NotNull method com/intellij/openapi/project/impl/ProjectImpl.getEarlyDisposable must not return null
|
// @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);
|
LOG.info("TreeCacheUtils cache.forEach catch Throwable but log to record.", e);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user