Enum.valueOf throws inconsistent exception across multiple platforms #KT-35116

This commit is contained in:
Abduqodiri Qurbonzoda
2023-06-11 03:14:37 +03:00
committed by Space Team
parent d6867917c9
commit 295fdc36ce
10 changed files with 34 additions and 11 deletions
@@ -20,6 +20,11 @@ internal fun throwISE(message: String) {
throw IllegalStateException(message)
}
@JsName("throwIAE")
internal fun throwIAE(message: String) {
throw IllegalArgumentException(message)
}
@JsName("throwUPAE")
internal fun throwUPAE(propertyName: String) {
throw UninitializedPropertyAccessException("lateinit property ${propertyName} has not been initialized")