mirror of
https://github.com/InsanusMokrassar/MicroUtils.git
synced 2024-12-18 06:40:07 +00:00
update safelyWithResult
This commit is contained in:
parent
623e0cd369
commit
04ef371337
@ -117,9 +117,7 @@ suspend inline fun <T> runCatchingSafely(
|
|||||||
|
|
||||||
suspend inline fun <T> safelyWithResult(
|
suspend inline fun <T> safelyWithResult(
|
||||||
noinline block: suspend CoroutineScope.() -> T
|
noinline block: suspend CoroutineScope.() -> T
|
||||||
): Result<T> = runCatching {
|
): Result<T> = runCatchingSafely(defaultSafelyExceptionHandler, block)
|
||||||
safely({ throw it }, block)
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Use this handler in cases you wish to include handling of exceptions by [defaultSafelyWithoutExceptionHandler] and
|
* Use this handler in cases you wish to include handling of exceptions by [defaultSafelyWithoutExceptionHandler] and
|
||||||
|
Loading…
Reference in New Issue
Block a user