Skip to content

Commit 3682e30

Browse files
committed
Catch errors during indexing again
1 parent ed3905f commit 3682e30

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

server/src/main/kotlin/org/javacs/kt/index/SymbolIndex.kt

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,17 @@ class SymbolIndex {
2222
val started = System.currentTimeMillis()
2323
LOG.info("Updating symbol index...")
2424

25-
for (descriptor in allDescriptors(module)) {
26-
globalDescriptors[descriptor.fqNameSafe] = descriptor
27-
}
25+
try {
26+
for (descriptor in allDescriptors(module)) {
27+
globalDescriptors[descriptor.fqNameSafe] = descriptor
28+
}
2829

29-
val finished = System.currentTimeMillis()
30-
LOG.info("Updated symbol index in ${finished - started} ms! (${globalDescriptors.size} symbol(s))")
30+
val finished = System.currentTimeMillis()
31+
LOG.info("Updated symbol index in ${finished - started} ms! (${globalDescriptors.size} symbol(s))")
32+
} catch (e: Exception) {
33+
LOG.error("Error while updating symbol index")
34+
LOG.printStackTrace(e)
35+
}
3136
}
3237

3338
private fun allDescriptors(module: ModuleDescriptor): Collection<DeclarationDescriptor> = allPackages(module)

0 commit comments

Comments
 (0)