Skip to content

Commit 6f07c58

Browse files
move throwPowerSyncException
1 parent 95dba7d commit 6f07c58

File tree

2 files changed

+12
-15
lines changed

2 files changed

+12
-15
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
1-
@file:Suppress("ktlint:standard:no-empty-file")
2-
31
// This is required to build the iOS framework
42

53
package com.powersync
4+
5+
/**
6+
* Helper class designed to bridge SKIEE methods and allow them to throw
7+
* `PowerSyncException`. This is necessary because these exceptions cannot
8+
* be thrown directly in Swift.
9+
*
10+
* The class provides a mechanism to handle exceptions in a way that is
11+
* compatible with the Swift environment, ensuring proper error propagation
12+
* and handling.
13+
*/
14+
@Throws(PowerSyncException::class)
15+
public fun throwPowerSyncException(exception: PowerSyncException): Unit = throw exception

core/src/commonMain/kotlin/com/powersync/PowerSyncException.kt

-13
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,3 @@ public class PowerSyncException(
44
message: String,
55
cause: Throwable,
66
) : Exception(message, cause)
7-
8-
9-
/**
10-
* Helper class designed to bridge SKIEE methods and allow them to throw
11-
* `PowerSyncException`. This is necessary because these exceptions cannot
12-
* be thrown directly in Swift.
13-
*
14-
* The class provides a mechanism to handle exceptions in a way that is
15-
* compatible with the Swift environment, ensuring proper error propagation
16-
* and handling.
17-
*/
18-
@Throws(PowerSyncException::class)
19-
public fun throwPowerSyncException(exception: PowerSyncException): Unit = throw exception

0 commit comments

Comments
 (0)