10 lines
161 B
Plaintext
10 lines
161 B
Plaintext
fun foo(s: String): String? {
|
|
try {
|
|
Integer.parseInt(s);
|
|
return "no message";
|
|
}
|
|
catch(e: NumberFormatException) {
|
|
return e.getMessage();
|
|
}
|
|
}
|