diff --git a/compiler/test-infrastructure/tests/org/jetbrains/kotlin/test/TestRunner.kt b/compiler/test-infrastructure/tests/org/jetbrains/kotlin/test/TestRunner.kt index c08ee2d7ea3..43799cf3742 100644 --- a/compiler/test-infrastructure/tests/org/jetbrains/kotlin/test/TestRunner.kt +++ b/compiler/test-infrastructure/tests/org/jetbrains/kotlin/test/TestRunner.kt @@ -1,5 +1,5 @@ /* - * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ @@ -82,7 +82,9 @@ class TestRunner(private val testConfiguration: TestConfiguration) { } testConfiguration.preAnalysisHandlers.forEach { preprocessor -> - preprocessor.prepareSealedClassInheritors(moduleStructure) + withAssertionCatching(WrappedException::FromPreAnalysisHandler) { + preprocessor.prepareSealedClassInheritors(moduleStructure) + } } for (module in modules) { diff --git a/compiler/test-infrastructure/tests/org/jetbrains/kotlin/test/WrappedException.kt b/compiler/test-infrastructure/tests/org/jetbrains/kotlin/test/WrappedException.kt index 495105d626b..f6abd88120e 100644 --- a/compiler/test-infrastructure/tests/org/jetbrains/kotlin/test/WrappedException.kt +++ b/compiler/test-infrastructure/tests/org/jetbrains/kotlin/test/WrappedException.kt @@ -1,5 +1,5 @@ /* - * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ @@ -25,9 +25,11 @@ sealed class WrappedException( get() = "Exception was thrown" } - class FromMetaInfoHandler(cause: Throwable) : WrappedException(cause, 1, 1) + class FromPreAnalysisHandler(cause: Throwable) : WrappedException(cause, 1, 1) - class FromHandler(cause: Throwable, val handler: AnalysisHandler<*>) : WrappedException(cause, 1, 2) { + class FromMetaInfoHandler(cause: Throwable) : WrappedException(cause, 1, 2) + + class FromHandler(cause: Throwable, val handler: AnalysisHandler<*>) : WrappedException(cause, 1, 3) { override val failureDisablesNextSteps: Boolean get() = handler.failureDisablesNextSteps }