Skip to content

Commit d5d7ab3

Browse files
committed
Catch UnsupportedOperationException on client extensions
1 parent 1cd8d67 commit d5d7ab3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

server/src/main/kotlin/org/javacs/kt/KotlinLanguageServer.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,11 @@ class KotlinLanguageServer : LanguageServer, Closeable {
133133
}
134134

135135
override fun initialized(params: InitializedParams?) {
136-
client.buildOutputLocationSet(classPath.outputDirectory.absolutePath)
136+
try {
137+
client.buildOutputLocationSet(classPath.outputDirectory.absolutePath)
138+
} catch (ex: UnsupportedOperationException) {
139+
LOG.info("Client does not support notification kotlin/buildOutputLocationSet")
140+
}
137141
}
138142

139143
private fun connectLoggingBackend() {

0 commit comments

Comments
 (0)