@@ -54,11 +54,12 @@ import kotlinx.collections.immutable.persistentListOf
54
54
import kotlinx.collections.immutable.persistentMapOf
55
55
import kotlinx.collections.immutable.persistentSetOf
56
56
import org.utbot.framework.codegen.model.constructor.builtin.streamsDeepEqualsMethodId
57
- import org.utbot.framework.plugin.api.util.isSubtypeOf
58
- import org.utbot.framework.plugin.api.util.isNotSubtypeOf
59
- import org.utbot.framework.plugin.api.util.isCheckedException
60
- import org.utbot.framework.plugin.api.util.id
61
57
import org.utbot.framework.plugin.api.util.executableId
58
+ import org.utbot.framework.plugin.api.util.id
59
+ import org.utbot.framework.plugin.api.util.isCheckedException
60
+ import org.utbot.framework.plugin.api.util.isNotSubtypeOf
61
+ import org.utbot.framework.plugin.api.util.isSubtypeOf
62
+ import org.utbot.framework.plugin.api.util.jClass
62
63
63
64
/* *
64
65
* Interface for all code generation context aware entities
@@ -240,11 +241,11 @@ internal interface CgContextOwner {
240
241
when (exception) {
241
242
is BuiltinClassId -> {}
242
243
else -> {
243
- if (exception isNotSubtypeOf Throwable ::class .id) {
244
- error( " Class $exception which is not a Throwable was passed" )
244
+ require (exception isNotSubtypeOf Throwable ::class .id) {
245
+ " Class $exception which is not a Throwable was passed"
245
246
}
246
247
247
- val isUnchecked = ! exception.isCheckedException
248
+ val isUnchecked = ! exception.jClass. isCheckedException
248
249
val alreadyAdded =
249
250
collectedExceptions.any { existingException -> exception isSubtypeOf existingException }
250
251
0 commit comments