Skip to content

Commit c3ec456

Browse files
Export UnsafeEventLoopYield error type
Some apps wrap instance.exports and monitor exceptions thrown during execution of Wasm program but `UnsafeEventLoopYield` is not something they want to report, so they need to be able to filter them out. However, they cannot use `UnsafeEventLoopYield` type name because some bundlers can rename it. We should export it to allow them not to depend on the constructor name
1 parent 8a1007e commit c3ec456

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: Runtime/src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -749,4 +749,4 @@ export class SwiftRuntime {
749749
/// This error is thrown to unwind the call stack of the Swift program and return the control to
750750
/// the JavaScript side. Otherwise, the `swift_task_asyncMainDrainQueue` ends up with `abort()`
751751
/// because the event loop expects `exit()` call before the end of the event loop.
752-
class UnsafeEventLoopYield extends Error {}
752+
export class UnsafeEventLoopYield extends Error {}

0 commit comments

Comments
 (0)