[JS IR BE] Don't render null messages in Throwable
Set message property to 'undefined' to make Error.prototype.toString skip it
This commit is contained in:
+2
-2
@@ -23,10 +23,10 @@ class MyException2(i1: String, i2: String, m: String? = null, t: Throwable? = nu
|
||||
|
||||
|
||||
fun box(): String {
|
||||
check(MyException1("1", "2"), "MyException1: null")
|
||||
check(MyException1("1", "2"), "MyException1")
|
||||
check(MyException1("3", "4", "aaa"), "MyException1: aaa")
|
||||
check(MyException1("5", "6", t = Throwable("bbb")), "MyException1: Throwable: bbb")
|
||||
check(MyException2("7", "8"), "MyException2: null")
|
||||
check(MyException2("7", "8"), "MyException2")
|
||||
check(MyException2("9", "0", "ccc"), "MyException2: ccc")
|
||||
check(MyException2("A", "B", t = Throwable("ddd")), "MyException2: Throwable: ddd")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user