BridgeJS: Enforce throws(JSException) on @JS protocol methods#563
Conversation
kateinoigakukun
left a comment
There was a problem hiding this comment.
Thanks!
Sorry, something went wrong.
|
I think we need to enable the exception check emitted by |
Sorry, something went wrong.
|
@kateinoigakukun my bad, now added exception checking for protocol wrapper methods with new The issue was that protocol wrappers call into JavaScript (like |
Sorry, something went wrong.
1c4d924 to
905f4ea
Compare
February 3, 2026 11:24
BridgeJS: Enforce throws(JSException) on @js protocol methods
905f4ea to
d4da0e3
Compare
February 3, 2026 11:34
a070ba0
into
swiftwasm:main
Feb 3, 2026
Overview
throws(JSException)on@JS protocolmethods, matching the import side (@JSFunction) behaviorTest updates
Protocol.swifttest input: Addedthrows(JSException)to all protocol methodsExportAPITests.swift: UpdatedDataProcessorprotocol methods with throwsDocumentation
Exporting-Swift-Protocols.mdwith throws requirement and examplesMotivation
This partially addresses the inconsistency where
@JSFunction(import side) requiresthrows(JSException)but@JS protocolmethods (export side) didn't.Properties will be covered in separate PR 🙏🏻