Skip to content

Commit

Permalink
Override reportIssue(_:_:) to add @_transparency attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
Killectro committed Nov 12, 2024
1 parent 05c9f02 commit 0c3e129
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Sources/IssueReporting/IssueReporters/RuntimeWarningReporter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,24 @@ public struct _RuntimeWarningReporter: IssueReporter {
#endif
}

@_transparent
public func reportIssue(
_ error: any Error,
_ message: @autoclosure () -> String?,
fileID: StaticString,
filePath: StaticString,
line: UInt,
column: UInt
) {
reportIssue(
"Caught error: \(error)\(message().map { ": \($0)" } ?? "")",
fileID: fileID,
filePath: filePath,
line: line,
column: column
)
}

public func expectIssue(
_ message: @autoclosure () -> String?,
fileID: StaticString,
Expand Down

0 comments on commit 0c3e129

Please sign in to comment.