Transform Throwable members to properties

This commit is contained in:
Denis Zharkov
2015-10-13 20:30:29 +03:00
committed by Mikhail Glukhikh
parent 9088bf67c7
commit 17c906658d
22 changed files with 63 additions and 51 deletions
@@ -0,0 +1,10 @@
fun box(): String {
try {
throw Throwable("OK", null)
} catch (t: Throwable) {
if (t.cause != null) return "fail 1"
return t.message!!
}
return "fail 2"
}