catch

inline fun <R, T : R, E : Throwable> KrosstalkResult<T>.catch(klass: KClass<E>, value: (E) -> KrosstalkResult<R>): KrosstalkResult<R>

Catch an exception by type. Must be called where the exception/KrosstalkResult is created, type information is lost during serialization.

Sources

Link copied to clipboard