We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9512373 commit e261ac8Copy full SHA for e261ac8
Sources/JavaScriptEventLoop/JSRemote.swift
@@ -66,12 +66,10 @@ private final class _JSRemoteContext: @unchecked Sendable {
66
continuation: CheckedContinuation<Result<R, E>, Never>
67
) {
68
self.invokeBody = {
69
- do {
+ do throws(E) {
70
continuation.resume(returning: .success(try body(sourceObject)))
71
- } catch let error as E {
72
- continuation.resume(returning: .failure(error))
73
} catch {
74
- preconditionFailure("Unexpected error type: \(error)")
+ continuation.resume(returning: .failure(error))
75
}
76
return false
77
0 commit comments