-
public final class MultiCatchKt
-
-
Method Summary
-
-
Method Detail
-
onException
final static <R extends Any, T extends R> <ERROR CLASS> onException(Result<T> $self, KClass<out Throwable> exceptions, Function1<Throwable, T> transform)
Analog of Java multicatch with pipe (|). Should be used in conjunction with kotlin.runCatching. In case if thrown exception is one of the provided in vararg exceptions param - transform block will be executed. Otherwise exception is re-thrown further in chain.
Can be chained with other onException blocks.
-
-
-
-