Fix for KT-5910: Can't call Throwable() in Kotlin

#KT-5910 Fixed
This commit is contained in:
Michael Bogdanov
2015-12-14 15:38:07 +03:00
parent d40e9ffc13
commit ca9e8fc5a7
6 changed files with 98 additions and 2 deletions
+7 -1
View File
@@ -22,7 +22,13 @@ package kotlin
* @param message the detail message string.
* @param cause the cause of this throwable.
*/
public open class Throwable(val message: String? = null, val cause: Throwable? = null) {
public open class Throwable(val message: String?, val cause: Throwable?) {
constructor(message: String?) : this(message, null)
constructor(cause: Throwable?) : this(cause?.toString(), cause)
constructor() : this(null, null)
/**
* Prints the stack trace of this throwable to the standard output.
*/