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