Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions Sources/IssueReporting/ErrorReporting.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// swift-format-ignore-file
// Note: Whitespace changes are used to workaround compiler bug
// https://github.com/swiftlang/swift/issues/79285

/// Evaluates a throwing closure and automatically catches and reports any error thrown.
///
/// - Parameters:
Expand Down Expand Up @@ -74,8 +78,9 @@ public func withErrorReporting<R>(
line: UInt = #line,
column: UInt = #column,
isolation: isolated (any Actor)? = #isolation,
catching body: () async throws -> sending R
) async -> R? {
// DO NOT FIX THE WHITESPACE IN THE NEXT LINE UNTIL 5.10 IS UNSUPPORTED
// https://github.com/swiftlang/swift/issues/79285
catching body: () async throws -> sending R) async -> R? {
if let reporters {
return await withIssueReporters(reporters) {
do {
Expand Down