catch write errors in kotlin if core binary stopped
This commit is contained in:
parent
cd3d95b7eb
commit
7338a842e9
1 changed files with 6 additions and 2 deletions
|
|
@ -26,8 +26,12 @@ class CoreMessenger(private val project: Project, esbuildPath: String, continueC
|
|||
private val useTcp: Boolean = false
|
||||
|
||||
private fun write(message: String) {
|
||||
writer?.write(message + "\r\n")
|
||||
writer?.flush()
|
||||
try {
|
||||
writer?.write(message + "\r\n")
|
||||
writer?.flush()
|
||||
} catch (e: Exception) {
|
||||
println("Error writing to Continue core: $e")
|
||||
}
|
||||
}
|
||||
|
||||
private fun close() {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue