F
fun <T : Throwable> (() -> Any?).getOrDefault(exception: KClass<out T>, catchBlock: (Throwable) -> Unit = {it.printStackTrace()}, defaultValue: String?) : Any? {
try {
return this()
} catch (e: Throwable) {
if (e::class==exception) catchBlock(e) else throw e
}
return defaultValue
}