From 2f8af7bcec356bbfbf7fc5594694aa940f1b0f10 Mon Sep 17 00:00:00 2001 From: develar Date: Fri, 17 Aug 2012 16:43:59 +0400 Subject: [PATCH] Throwable constructor parameter message should be nullable string Cherry-picked from: https://github.com/develar/kotlin/commit/7604aa2a0f21a3fa78d94bbabc0f8a6c140c14e4 https://github.com/develar/kotlin/commit/578d51f783bce7da71f08e21706517416ed9f7a6 --- js/js.libraries/src/core/javalang.kt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/js/js.libraries/src/core/javalang.kt b/js/js.libraries/src/core/javalang.kt index ecbf2ebead4..e98f2197228 100644 --- a/js/js.libraries/src/core/javalang.kt +++ b/js/js.libraries/src/core/javalang.kt @@ -4,25 +4,25 @@ import java.io.IOException import js.library library -open public class Exception() : Throwable() {} +open public class Exception(message: String? = null) : Throwable() {} library("splitString") public fun String.split(regex : String) : Array = js.noImpl library -public class IllegalArgumentException(message: String = "") : Exception() {} +public class IllegalArgumentException(message: String? = null) : Exception() {} library -public class IllegalStateException(message: String = "") : Exception() {} +public class IllegalStateException(message: String? = null) : Exception() {} library -public class IndexOutOfBoundsException(message: String = "") : Exception() {} +public class IndexOutOfBoundsException(message: String? = null) : Exception() {} library -public class UnsupportedOperationException(message: String = "") : Exception() {} +public class UnsupportedOperationException(message: String? = null) : Exception() {} library -public class NumberFormatException(message: String = "") : Exception() {} +public class NumberFormatException(message: String? = null) : Exception() {} library public trait Runnable {