What is the correct way of handling exceptions in Kotlin?

666 Views Asked by At

In Java, Android Studio gives Unhandled Exception error for some functions. for e.g., when we write code for converting a String to a Date variable, it shows Unhandled Exception:ParseException & pressing Alt+Insert automatically adds the try catch block & we can write code in catch block for exception conditions. But in Kotlin I am not seeing such warnings. Is there any other way to handle exceptions in Kotlin?

0

There are 0 best solutions below