File tree 1 file changed +10
-0
lines changed
language-server/src/dotty/tools/languageserver 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import java.net.URI
5
5
import java .io ._
6
6
import java .nio .file ._
7
7
import java .util .concurrent .CompletableFuture
8
+ import java .util .function .Function
8
9
9
10
import com .fasterxml .jackson .databind .ObjectMapper
10
11
@@ -133,6 +134,15 @@ class DottyLanguageServer extends LanguageServer
133
134
// Do most of the initialization asynchronously so that we can return early
134
135
// from this method and thus let the client know our capabilities.
135
136
CompletableFuture .supplyAsync(() => drivers)
137
+ .exceptionally {
138
+ // Can't use a function literal here because of #2367
139
+ new Function [Throwable , Nothing ] {
140
+ def apply (ex : Throwable ) = {
141
+ ex.printStackTrace
142
+ sys.exit(1 )
143
+ }
144
+ }
145
+ }
136
146
137
147
new InitializeResult (c)
138
148
}
You can’t perform that action at this time.
0 commit comments