diff --git a/libraries/stdlib/common/src/kotlin/ExceptionsH.kt b/libraries/stdlib/common/src/kotlin/ExceptionsH.kt index a7915556f91..019fdbec368 100644 --- a/libraries/stdlib/common/src/kotlin/ExceptionsH.kt +++ b/libraries/stdlib/common/src/kotlin/ExceptionsH.kt @@ -109,7 +109,11 @@ public expect class UninitializedPropertyAccessException : RuntimeException { constructor(cause: Throwable?) } +/** + * Thrown after invocation of a function or property that was expected to return `Nothing`, but returned something instead. + */ @SinceKotlin("1.4") +@PublishedApi internal class KotlinNothingValueException : RuntimeException { constructor() : super() constructor(message: String?) : super(message) diff --git a/libraries/tools/binary-compatibility-validator/reference-public-api/kotlin-stdlib-runtime-merged.txt b/libraries/tools/binary-compatibility-validator/reference-public-api/kotlin-stdlib-runtime-merged.txt index a886158dad8..8debda1ead8 100644 --- a/libraries/tools/binary-compatibility-validator/reference-public-api/kotlin-stdlib-runtime-merged.txt +++ b/libraries/tools/binary-compatibility-validator/reference-public-api/kotlin-stdlib-runtime-merged.txt @@ -51,6 +51,13 @@ public abstract interface annotation class kotlin/ExtensionFunctionType : java/l public abstract interface class kotlin/Function { } +public final class kotlin/KotlinNothingValueException : java/lang/RuntimeException { + public fun ()V + public fun (Ljava/lang/String;)V + public fun (Ljava/lang/String;Ljava/lang/Throwable;)V + public fun (Ljava/lang/Throwable;)V +} + public class kotlin/KotlinNullPointerException : java/lang/NullPointerException { public fun ()V public fun (Ljava/lang/String;)V