more diagnostics for VfsData.initFile exceptions (IDEA-141920)

This commit is contained in:
peter
2015-06-25 18:28:46 +02:00
parent 122f7ddbe2
commit 8a511acde8
@@ -919,7 +919,18 @@ public class PersistentFSImpl extends PersistentFS implements ApplicationCompone
VirtualFileSystemEntry root = myRoots.get(rootUrl);
if (root != null) return root;
VfsData.initFile(rootId, segment, -1, directoryData);
try {
VfsData.initFile(rootId, segment, -1, directoryData);
}
catch (AssertionError e) {
for (Map.Entry<String, VirtualFileSystemEntry> entry : myRoots.entrySet()) {
final VirtualFileSystemEntry existingRoot = entry.getValue();
if (Math.abs(existingRoot.getId()) == rootId) {
throw new RuntimeException("Duplicate FS roots: " + rootUrl + " and " + entry.getKey() + ", id=" + rootId + ", valid=" + existingRoot.isValid(), e);
}
}
throw new RuntimeException("No root duplication", e);
}
incStructuralModificationCount();
mark = writeAttributesToRecord(rootId, 0, newRoot, fs, attributes);