mirror of
https://github.com/InsanusMokrassar/MicroUtils.git
synced 2024-11-22 16:23:50 +00:00
return previous logic of work with safely
This commit is contained in:
parent
041be5a1d1
commit
242f4b02d0
@ -3,7 +3,6 @@
|
||||
## 0.5.3
|
||||
|
||||
* `Coroutines`:
|
||||
* **Mechanism of `safely` has been changed: instead of creating new scope now is used `withContext`**
|
||||
* Extensions `doInUI` and `doInDefault` were replaced in common and available on any supported platform
|
||||
* Extension `doInIO` replaced into `jvm` and available on any `JVM` platform
|
||||
* Old extension `safelyWithouException` without `onException` has been replaced by its copy with `onException` and
|
||||
|
@ -101,7 +101,7 @@ suspend inline fun <T> safely(
|
||||
noinline block: suspend CoroutineScope.() -> T
|
||||
): T {
|
||||
return try {
|
||||
withContext(SupervisorJob(), block)
|
||||
supervisorScope(block)
|
||||
} catch (e: Throwable) {
|
||||
coroutineContext[ContextSafelyExceptionHandlerKey] ?.handler ?.invoke(e)
|
||||
onException(e)
|
||||
|
Loading…
Reference in New Issue
Block a user