invokeDeathSafeThrow

fun <R> invokeDeathSafeThrow(action: () -> R): R

Invokes action and destroys the lifecycle owner when it throws a DeadObjectException.

The exception is rethrown. Use this method when a return value is required or when the call cannot be ignored safely. The caller needs to handle the DeadObjectException too.