stdlib-common: correct common exception type declarations

This commit is contained in:
Ilya Gorbunov
2018-01-25 07:59:37 +03:00
parent 10be42ddaa
commit 0164f9b730
@@ -41,10 +41,13 @@ public expect open class IndexOutOfBoundsException : RuntimeException {
constructor(message: String?)
}
@Suppress("NO_ACTUAL_FOR_EXPECT") // TODO: Introduce typealias in JVM
public expect open class ConcurrentModificationException : RuntimeException {
constructor()
constructor(message: String?)
@Deprecated("The constructor is not supported on all platforms and will be removed from kotlin-stdlib-common soon.")
constructor(message: String?, cause: Throwable?)
@Deprecated("The constructor is not supported on all platforms and will be removed from kotlin-stdlib-common soon.")
constructor(cause: Throwable?)
}
@@ -75,11 +78,12 @@ public expect open class AssertionError : Error {
constructor(message: Any?)
}
public expect open class NoSuchElementException : Exception {
public expect open class NoSuchElementException : RuntimeException {
constructor()
constructor(message: String?)
}
@Deprecated("This exception type is not supposed to be thrown or caught in common code and will be removed from kotlin-stdlib-common soon.")
public expect open class NoWhenBranchMatchedException : RuntimeException {
constructor()
constructor(message: String?)
@@ -87,7 +91,8 @@ public expect open class NoWhenBranchMatchedException : RuntimeException {
constructor(cause: Throwable?)
}
public expect open class UninitializedPropertyAccessException : RuntimeException {
@Deprecated("This exception type is not supposed to be thrown or caught in common code and will be removed from kotlin-stdlib-common soon.")
public expect class UninitializedPropertyAccessException : RuntimeException {
constructor()
constructor(message: String?)
constructor(message: String?, cause: Throwable?)