[IC] Fix transaction wasn't marked as unsuccessful on execution exception
#KT-56052 In Progress
This commit is contained in:
committed by
Space Team
parent
8825cf7bf6
commit
2bff38dd27
@@ -126,6 +126,12 @@ abstract class BaseCompilationTransaction : CompilationTransaction {
|
|||||||
executionThrowable?.addSuppressed(exception)
|
executionThrowable?.addSuppressed(exception)
|
||||||
executionThrowable ?: exception
|
executionThrowable ?: exception
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected fun checkForExecutionException() {
|
||||||
|
if (executionThrowable != null) {
|
||||||
|
isSuccessful = false
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -143,6 +149,7 @@ class NonRecoverableCompilationTransaction : CompilationTransaction, BaseCompila
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun close() {
|
override fun close() {
|
||||||
|
checkForExecutionException()
|
||||||
closeCachesManager()?.let {
|
closeCachesManager()?.let {
|
||||||
throw it
|
throw it
|
||||||
}
|
}
|
||||||
@@ -239,6 +246,7 @@ class RecoverableCompilationTransaction(
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun close() {
|
override fun close() {
|
||||||
|
checkForExecutionException()
|
||||||
val mainException = closeCachesManager()
|
val mainException = closeCachesManager()
|
||||||
val exceptionToThrow = runCatching {
|
val exceptionToThrow = runCatching {
|
||||||
if (isSuccessful) {
|
if (isSuccessful) {
|
||||||
|
|||||||
Reference in New Issue
Block a user