Skip to content

Commit 9512373

Browse files
Handle non-E catch branch in JSRemote typed continuation
Co-authored-by: Shelley <shelley@exe.dev>
1 parent a1e3d93 commit 9512373

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Sources/JavaScriptEventLoop/JSRemote.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ private final class _JSRemoteContext: @unchecked Sendable {
7070
continuation.resume(returning: .success(try body(sourceObject)))
7171
} catch let error as E {
7272
continuation.resume(returning: .failure(error))
73+
} catch {
74+
preconditionFailure("Unexpected error type: \(error)")
7375
}
7476
return false
7577
}

0 commit comments

Comments
 (0)