Catching Result
Properties
Functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun onFailureIf(test: (Throwable) -> Boolean, action: (Throwable) -> Unit): CatchingResult<T>
Link copied to clipboard
inline fun <E : Throwable, R, T : R> CatchingResult<T>.recoverException(transform: (E) -> R): CatchingResult<Any?>
如果异常为 E,对 T 进行 transform,返回新的 CatchingResult。
Link copied to clipboard
重新抛出类型为 E 的异常,请使用 rethrowCancellation 替代 rethrow<CancellationException>()
如果异常为 E,执行 on 并抛出异常。请使用 rethrowCancellation 替代 rethrow<CancellationException>()
Link copied to clipboard
重新抛出类型为 CancellationException 的异常
如果异常为 CancellationException,执行 on 并抛出 CancellationException
Link copied to clipboard
如果异常不是 E,重新抛出