Fix exception contructors to match JVM/JS signatures. (#1329)

This commit is contained in:
Nikolay Igotti
2018-02-15 15:21:41 +03:00
committed by GitHub
parent b42e9e9c80
commit bac96e3927
+53 -100
View File
@@ -18,207 +18,160 @@ package kotlin
public open class Error : Throwable { public open class Error : Throwable {
constructor() : super() { constructor() : super()
}
constructor(message: String) : super(message) { constructor(message: String?) : super(message)
}
constructor(message: String, cause: Throwable) : super(message, cause) { constructor(message: String?, cause: Throwable?) : super(message, cause)
}
constructor(cause: Throwable) : super(cause) { constructor(cause: Throwable?) : super(cause)
}
} }
public open class Exception : Throwable { public open class Exception : Throwable {
constructor() : super() { constructor() : super()
}
constructor(message: String) : super(message) { constructor(message: String?) : super(message)
}
constructor(message: String, cause: Throwable) : super(message, cause) { constructor(message: String?, cause: Throwable?) : super(message, cause)
}
constructor(cause: Throwable) : super(cause) { constructor(cause: Throwable?) : super(cause)
}
} }
public open class RuntimeException : Exception { public open class RuntimeException : Exception {
constructor() : super() { constructor() : super()
}
constructor(message: String) : super(message) { constructor(message: String?) : super(message)
}
constructor(message: String, cause: Throwable) : super(message, cause) { constructor(message: String?, cause: Throwable?) : super(message, cause)
}
constructor(cause: Throwable) : super(cause) { constructor(cause: Throwable?) : super(cause)
}
} }
public class NullPointerException : RuntimeException { public class NullPointerException : RuntimeException {
constructor() : super() { constructor() : super()
}
constructor(s: String) : super(s) { constructor(s: String?) : super(s)
}
} }
public open class NoSuchElementException : RuntimeException { public open class NoSuchElementException : RuntimeException {
constructor() : super() { constructor() : super()
}
constructor(s: String) : super(s) { constructor(s: String?) : super(s)
}
} }
public open class IllegalArgumentException : RuntimeException { public open class IllegalArgumentException : RuntimeException {
constructor() : super() { constructor() : super()
}
constructor(s: String) : super(s) { constructor(s: String?) : super(s)
}
constructor(message: String, cause: Throwable) : super(message, cause) { constructor(message: String?, cause: Throwable?) : super(message, cause)
}
constructor(cause: Throwable) : super(cause) { constructor(cause: Throwable?) : super(cause)
}
} }
public open class IllegalStateException : RuntimeException { public open class IllegalStateException : RuntimeException {
constructor() : super() { constructor() : super()
}
constructor(s: String) : super(s) { constructor(s: String?) : super(s)
}
constructor(message: String, cause: Throwable) : super(message, cause) { constructor(message: String?, cause: Throwable?) : super(message, cause)
}
constructor(cause: Throwable) : super(cause) { constructor(cause: Throwable?) : super(cause)
}
} }
public open class UnsupportedOperationException : RuntimeException { public open class UnsupportedOperationException : RuntimeException {
constructor() { constructor()
}
constructor(message: String) : super(message) { constructor(message: String?) : super(message)
}
constructor(message: String, cause: Throwable) : super(message, cause) { constructor(message: String?, cause: Throwable?) : super(message, cause)
}
constructor(cause: Throwable) : super(cause) { constructor(cause: Throwable?) : super(cause)
}
} }
public open class IndexOutOfBoundsException : RuntimeException { public open class IndexOutOfBoundsException : RuntimeException {
constructor() : super() { constructor() : super()
}
constructor(s: String) : super(s) { constructor(s: String?) : super(s)
}
} }
public open class ArrayIndexOutOfBoundsException : IndexOutOfBoundsException { public open class ArrayIndexOutOfBoundsException : IndexOutOfBoundsException {
constructor() : super() { constructor() : super()
}
constructor(s: String) : super(s) { constructor(s: String?) : super(s)
}
} }
public open class ClassCastException : RuntimeException { public open class ClassCastException : RuntimeException {
constructor() : super() { constructor() : super()
}
constructor(s: String) : super(s) { constructor(s: String?) : super(s)
}
} }
public open class TypeCastException : ClassCastException { public open class TypeCastException : ClassCastException {
constructor() : super() { constructor() : super()
}
constructor(s: String) : super(s) { constructor(s: String?) : super(s)
}
} }
public open class ArithmeticException : RuntimeException { public open class ArithmeticException : RuntimeException {
constructor() : super() { constructor() : super()
}
constructor(s: String) : super(s) { constructor(s: String?) : super(s)
}
} }
public open class AssertionError : Error { public open class AssertionError : Error {
constructor() { constructor()
}
constructor(message: String) : super(message) { constructor(message: String?) : super(message)
}
constructor(message: Any) : super(message.toString()) { constructor(message: Any?) : super(message.toString())
}
constructor(message: String, cause: Throwable) : super(message, cause) { constructor(message: String?, cause: Throwable?) : super(message, cause)
}
} }
public open class NoWhenBranchMatchedException : RuntimeException { public open class NoWhenBranchMatchedException : RuntimeException {
constructor() : super() { constructor() : super()
}
constructor(s: String) : super(s) { constructor(s: String?) : super(s)
}
} }
public open class UninitializedPropertyAccessException : RuntimeException { public open class UninitializedPropertyAccessException : RuntimeException {
constructor() : super() { constructor() : super()
}
constructor(s: String) : super(s) { constructor(s: String?) : super(s)
}
} }
public open class OutOfMemoryError : Error { public open class OutOfMemoryError : Error {
constructor() : super() { constructor() : super()
}
constructor(s: String) : super(s) { constructor(s: String?) : super(s)
}
} }
public open class NumberFormatException : IllegalArgumentException { public open class NumberFormatException : IllegalArgumentException {
constructor() : super() { constructor() : super()
}
constructor(s: String) : super(s) {} constructor(s: String?) : super(s)
} }
public open class IllegalCharacterConversionException : IllegalArgumentException { public open class IllegalCharacterConversionException : IllegalArgumentException {
constructor(): super() constructor(): super()
constructor(s: String) : super(s)
constructor(s: String?) : super(s)
} }