Skip to content

Commit d568eb3

Browse files
Sean OlszewskiSean Olszewski
authored andcommitted
add missing do...try...catch block
1 parent 2eca68e commit d568eb3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Sources/XCTest/Public/XCTestCase.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,11 @@ open class XCTestCase: XCTest {
229229
let asyncTeardownExpectation = XCTestExpectation(description: "asyncTeardownExpectation")
230230
Task {
231231
defer { asyncTeardownExpectation.fulfill() }
232-
try await tearDown()
232+
do {
233+
try await tearDown()
234+
} catch {
235+
recordError(error)
236+
}
233237
}
234238
_ = XCTWaiter.wait(for: [asyncTeardownExpectation], timeout: Self.asyncTestTimeout)
235239
}

0 commit comments

Comments
 (0)