Fix disappearing exceptions in GenerateProtoBuf.kt
Any exception caught during the generation (e.g. about an incompatible version) is lost because of 'System.exit(0)' in 'finally'
This commit is contained in:
@@ -17,8 +17,6 @@
|
||||
package org.jetbrains.jet.generators.protobuf
|
||||
|
||||
import com.intellij.execution.util.ExecUtil
|
||||
import com.intellij.execution.process.BaseOSProcessHandler
|
||||
import java.util.concurrent.ExecutorService
|
||||
import java.io.File
|
||||
|
||||
// This file generates protobuf classes from formal description.
|
||||
@@ -45,6 +43,10 @@ fun main(args: Array<String>) {
|
||||
modifyAndExecProtoc(commonProto, "compiler/tests")
|
||||
modifyAndExecProtoc(javaProto, "compiler/tests")
|
||||
}
|
||||
catch (e: Throwable) {
|
||||
e.printStackTrace()
|
||||
throw e
|
||||
}
|
||||
finally {
|
||||
// Workaround for JVM hanging: IDEA's process handler creates thread pool
|
||||
System.exit(0)
|
||||
|
||||
Reference in New Issue
Block a user