JS: add UninitializedPropertyAccessException and a helper method
diff --git a/js/js.libraries/src/core/exceptionUtils.kt b/js/js.libraries/src/core/exceptionUtils.kt
index 11120f8..87288ae 100644
--- a/js/js.libraries/src/core/exceptionUtils.kt
+++ b/js/js.libraries/src/core/exceptionUtils.kt
@@ -30,3 +30,8 @@
 private fun throwISE(message: String) {
     throw IllegalStateException(message)
 }
+
+@JsName("throwUPAE")
+private fun throwUPAE(propertyName: String) {
+    throw UninitializedPropertyAccessException("lateinit property ${propertyName} has not been initialized")
+}
diff --git a/js/js.libraries/src/core/exceptions.kt b/js/js.libraries/src/core/exceptions.kt
index 4d305f7..e0c2865 100644
--- a/js/js.libraries/src/core/exceptions.kt
+++ b/js/js.libraries/src/core/exceptions.kt
@@ -43,3 +43,5 @@
 public open class NoSuchElementException(message: String? = null) : Exception(message)
 
 public open class NoWhenBranchMatchedException(message: String? = null) : RuntimeException(message)
+
+public open class UninitializedPropertyAccessException(message: String? = null) : RuntimeException(message)