Create custom exception for lateinit
This commit is contained in:
@@ -3,7 +3,7 @@ public class A {
|
||||
fun getMyStr(): String {
|
||||
try {
|
||||
val a = str
|
||||
} catch (e: NullPointerException) {
|
||||
} catch (e: RuntimeException) {
|
||||
return "OK"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user