[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:
Svyatoslav Kuzmich
2019-07-03 17:21:37 +03:00
parent 94aebd0101
commit a2625c7bc8
5 changed files with 78 additions and 13 deletions
@@ -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")