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.
do...try...catch
1 parent 2eca68e commit d568eb3Copy full SHA for d568eb3
Sources/XCTest/Public/XCTestCase.swift
@@ -229,7 +229,11 @@ open class XCTestCase: XCTest {
229
let asyncTeardownExpectation = XCTestExpectation(description: "asyncTeardownExpectation")
230
Task {
231
defer { asyncTeardownExpectation.fulfill() }
232
- try await tearDown()
+ do {
233
+ try await tearDown()
234
+ } catch {
235
+ recordError(error)
236
+ }
237
}
238
_ = XCTWaiter.wait(for: [asyncTeardownExpectation], timeout: Self.asyncTestTimeout)
239
0 commit comments