https://kotlinlang.org logo
Title
u

user

06/24/2022, 12:31 PM
Are you tired of writing lots of try and catch blocks in android? here is a solution the solution is to write an inline function with a lambda type parameter the takes a unit , which can be any kind of code you write , and put it inside a try-catch block. now you just call it and write your intended code inside it.

this is a sample code of what I mean