We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e15540a commit 0c78802Copy full SHA for 0c78802
core/src/commonMain/kotlin/com/powersync/db/Functions.kt
@@ -2,6 +2,7 @@ package com.powersync.db
2
3
import co.touchlab.kermit.Logger
4
import com.powersync.PowerSyncException
5
+import kotlinx.coroutines.CancellationException
6
7
public fun <R> runWrapped(block: () -> R): R =
8
try {
@@ -20,6 +21,10 @@ public suspend fun <R> runWrappedSuspending(block: suspend () -> R): R =
20
21
22
block()
23
} catch (t: Throwable) {
24
+ if (t is CancellationException) {
25
+ throw t
26
+ }
27
+
28
if (t is PowerSyncException) {
29
Logger.e("PowerSyncException: ${t.message}")
30
throw t
0 commit comments