mirror of
https://github.com/InsanusMokrassar/MicroUtils.git
synced 2024-11-25 19:48:45 +00:00
update gradle config and fix build
This commit is contained in:
parent
eed7cfdc42
commit
c9bbfa3820
@ -39,11 +39,9 @@ object ContextSafelyExceptionHandlerKey : CoroutineContext.Key<ContextSafelyExce
|
||||
*/
|
||||
class ContextSafelyExceptionHandler(
|
||||
val handler: ExceptionHandler<Unit>
|
||||
) : CoroutineContext.Element, CoroutineExceptionHandler {
|
||||
) : CoroutineContext.Element {
|
||||
override val key: CoroutineContext.Key<*>
|
||||
get() = ContextSafelyExceptionHandlerKey
|
||||
|
||||
override fun handleException(context: CoroutineContext, exception: Throwable) = handler(exception)
|
||||
}
|
||||
|
||||
/**
|
||||
@ -150,9 +148,9 @@ suspend inline fun <T> runCatchingSafelyWithoutExceptions(
|
||||
safelyWithoutExceptions(onException, block)
|
||||
}
|
||||
|
||||
suspend inline fun CoroutineScope(
|
||||
inline fun CoroutineScope(
|
||||
context: CoroutineContext,
|
||||
defaultExceptionsHandler: ExceptionHandler<Unit>
|
||||
noinline defaultExceptionsHandler: ExceptionHandler<Unit>
|
||||
) = CoroutineScope(
|
||||
context + ContextSafelyExceptionHandler(defaultExceptionsHandler)
|
||||
)
|
||||
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
Loading…
Reference in New Issue
Block a user