Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* Added `triggerImmediately` to `onChange` method.
* Report real-time progress information about downloads through `SyncStatus.downloadProgress`.
* Compose: Add `composeState()` extension method on `SyncStatus`.
* [Internal] Added helper method for Swift `PowerSyncException` throwing.

## 1.0.0-BETA32

Expand Down
14 changes: 12 additions & 2 deletions PowerSyncKotlin/src/appleMain/kotlin/com/powersync/SDK.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
@file:Suppress("ktlint:standard:no-empty-file")

// This is required to build the iOS framework

package com.powersync

/**
* Helper class designed to bridge SKIEE methods and allow them to throw
* `PowerSyncException`. This is necessary because these exceptions cannot
* be thrown directly in Swift.
*
* The class provides a mechanism to handle exceptions in a way that is
* compatible with the Swift environment, ensuring proper error propagation
* and handling.
*/
@Throws(PowerSyncException::class)
public fun throwPowerSyncException(exception: PowerSyncException): Unit = throw exception