Skip to content

Commit 51e58ab

Browse files
Merge branch 'main' into v1
2 parents 87ec7ac + a1620cd commit 51e58ab

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
* Added `triggerImmediately` to `onChange` method.
88
* Report real-time progress information about downloads through `SyncStatus.downloadProgress`.
99
* Compose: Add `composeState()` extension method on `SyncStatus`.
10+
* [Internal] Added helper method for Swift `PowerSyncException` throwing.
1011

1112
## 1.0.0-BETA32
1213

Lines changed: 12 additions & 2 deletions
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

0 commit comments

Comments
 (0)