rethrow
Syntax-sugar for a lambda that throws it
(provided it
is a Throwable).
fun <T> T.map(transform: (T) -> T): T
// Before:
map(transform = { throw it })
// After:
map(transform = ::rethrow)
Content copied to clipboard
Throws
passed as the first argument to the lambda.
Syntax-sugar for a lambda that throws it
(provided it
is a Throwable) within a FlowCollector context.
Throws
passed as the first argument to the lambda.