mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 14:23:28 +07:00
[VFS] IJPL-150342 Properly report errors during HttpVirtualFile loading instead of throwing an assertion error
GitOrigin-RevId: 2656f06e46560640822d0ea1353203f8a345f8eb
This commit is contained in:
committed by
intellij-monorepo-bot
parent
654398f9a7
commit
13360cc5c6
@@ -127,7 +127,21 @@ public final class RemoteFileInfoImpl implements RemoteContentProvider.Downloadi
|
||||
}
|
||||
|
||||
VfsImplUtil.refreshAndFindFileByPath(LocalFileSystem.getInstance(), localIOFile.toString(), localFile -> {
|
||||
LOG.assertTrue(localFile != null, "Virtual local file not found for " + localIOFile.getAbsolutePath());
|
||||
if (localFile == null) {
|
||||
LOG.warn("Virtual local file not found for " + localIOFile.getAbsolutePath());
|
||||
var errorMessage = IdeCoreBundle.message("vfs.file.not.exist.error", localIOFile.getAbsolutePath());
|
||||
synchronized (myLock) {
|
||||
myLocalVirtualFile = null;
|
||||
myPrevLocalFile = null;
|
||||
myState = RemoteFileState.ERROR_OCCURRED;
|
||||
myErrorMessage = errorMessage;
|
||||
}
|
||||
for (FileDownloadingListener listener : myListeners) {
|
||||
listener.errorOccurred(errorMessage);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
LOG.debug("Virtual local file: " + localFile + ", size = " + localFile.getLength());
|
||||
synchronized (myLock) {
|
||||
myLocalVirtualFile = localFile;
|
||||
|
||||
Reference in New Issue
Block a user