From b57eab1e37ed6ef1ee21590e28ee04f0ae84daa5 Mon Sep 17 00:00:00 2001 From: Alexey Kudravtsev Date: Thu, 16 Apr 2020 01:42:43 +0300 Subject: [PATCH] bubble PCE from writeAndHandleErrors() to avoid VFS hard crash when executing jar.list() under canceled progress (IDEA-CR-61522) GitOrigin-RevId: 001f13df68ab25c9da283c1b7c5f34e8e918e8c8 --- .../openapi/vfs/newvfs/persistent/FSRecords.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/persistent/FSRecords.java b/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/persistent/FSRecords.java index 0de25c6b273c..925525ca0d3f 100644 --- a/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/persistent/FSRecords.java +++ b/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/persistent/FSRecords.java @@ -6,6 +6,7 @@ import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.application.ApplicationNamesInfo; import com.intellij.openapi.application.PathManager; import com.intellij.openapi.diagnostic.Logger; +import com.intellij.openapi.progress.ProcessCanceledException; import com.intellij.openapi.util.Disposer; import com.intellij.openapi.util.ThrowableComputable; import com.intellij.openapi.util.io.BufferExposingByteArrayOutputStream; @@ -967,6 +968,10 @@ public class FSRecords { w.lock(); return action.compute(); } + catch (ProcessCanceledException e) { + // now JarFileSystem list methods can be interrupted now + throw e; + } catch (Throwable e) { DbConnection.handleError(e); throw new RuntimeException(e); @@ -980,6 +985,10 @@ public class FSRecords { w.lock(); action.run(); } + catch (ProcessCanceledException e) { + // now JarFileSystem list methods can be interrupted now + throw e; + } catch (Throwable e) { DbConnection.handleError(e); throw new RuntimeException(e);