Fixed Throable cast error and changed gradle version in one more place
This commit is contained in:
1 parent
504e8db46b
commit
c6946c90b4
5 files changed
+6
-6
No files matched your search
@@ -18,8 +18,8 @@
|
||||
@file:Suppress("UnstableApiUsage")
|
||||
|
||||
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
|
||||
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
|
||||
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget
|
||||
import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl
|
||||
import org.jetbrains.kotlin.gradle.targets.js.testing.KotlinJsTest
|
||||
import org.jetbrains.kotlin.gradle.targets.js.webpack.KotlinWebpackConfig
|
||||
import org.jetbrains.kotlin.gradle.targets.native.tasks.KotlinNativeTest
|
||||
|
||||
+2
-2
@@ -32,11 +32,11 @@ object JsSodiumLoader {
|
||||
continuation.resumeWith(Result.success(Unit))
|
||||
null
|
||||
}.catch { e ->
|
||||
val throwable = e as? Throwable
|
||||
val throwable = e.toThrowableOrNull()
|
||||
if (throwable != null) {
|
||||
continuation.resumeWith(Result.failure(throwable))
|
||||
} else {
|
||||
continuation.resumeWith(Result.failure(Exception("Error: $e")))
|
||||
continuation.resumeWith(Result.failure(Throwable("Unknown error", throwable)))
|
||||
}
|
||||
null
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user