failing test for try/catch

This commit is contained in:
Dmitry Jemerov
2011-04-28 18:31:40 +02:00
parent 89d7adbf73
commit a61e045e85
2 changed files with 16 additions and 0 deletions
+9
View File
@@ -0,0 +1,9 @@
fun foo(s: String): String? {
try {
Integer.parseInt(s);
return "no message";
}
catch(e: NumberFormatException) {
return e.getMessage();
}
}