v0.8.2 #80

Open
altavir wants to merge 63 commits from dev into master
2 changed files with 5 additions and 1 deletions
Showing only changes of commit e5902c0bfe - Show all commits

View File

@ -3,6 +3,7 @@
## Unreleased
### Added
- Coroutine exception logging in context
### Changed
- Simplify inheritance logic in `MutableTypedMeta`

View File

@ -1,5 +1,6 @@
package space.kscience.dataforge.context
import kotlinx.coroutines.CoroutineExceptionHandler
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Job
import kotlinx.coroutines.SupervisorJob
@ -67,7 +68,9 @@ public open class Context internal constructor(
override val coroutineContext: CoroutineContext by lazy {
(parent ?: Global).coroutineContext.let { parenContext ->
parenContext + coroutineContext + SupervisorJob(parenContext[Job])
parenContext + coroutineContext + SupervisorJob(parenContext[Job]) + CoroutineExceptionHandler { _, throwable ->
logger.error(throwable) { "Exception in context $name" }
}
}
}