mirror of https://github.com/sbt/sbt.git
Merge pull request #6573 from github-samuel-clarenc/bspStartTry
[BSP] Send information when server process fails
This commit is contained in:
commit
31a04c9968
|
|
@ -364,9 +364,14 @@ class NetworkClient(
|
||||||
.directory(arguments.baseDirectory)
|
.directory(arguments.baseDirectory)
|
||||||
.redirectInput(Redirect.PIPE)
|
.redirectInput(Redirect.PIPE)
|
||||||
processBuilder.environment.put(Terminal.TERMINAL_PROPS, props)
|
processBuilder.environment.put(Terminal.TERMINAL_PROPS, props)
|
||||||
val process = processBuilder.start()
|
Try(processBuilder.start()) match {
|
||||||
sbtProcess.set(process)
|
case Success(process) =>
|
||||||
Some(process)
|
sbtProcess.set(process)
|
||||||
|
Some(process)
|
||||||
|
case Failure(e) =>
|
||||||
|
if (log) console.appendLog(Level.Error, s"Failed to start server : $e")
|
||||||
|
throw new ServerFailedException
|
||||||
|
}
|
||||||
case _ =>
|
case _ =>
|
||||||
if (log) {
|
if (log) {
|
||||||
console.appendLog(Level.Info, "sbt server is booting up")
|
console.appendLog(Level.Info, "sbt server is booting up")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue