diff --git a/Sources/SwiftDocC/Utility/FoundationExtensions/NoOpSignposterShim.swift b/Sources/SwiftDocC/Utility/FoundationExtensions/NoOpSignposterShim.swift index 4bd5cfd6f..d0668afc7 100644 --- a/Sources/SwiftDocC/Utility/FoundationExtensions/NoOpSignposterShim.swift +++ b/Sources/SwiftDocC/Utility/FoundationExtensions/NoOpSignposterShim.swift @@ -105,6 +105,10 @@ package struct NoOpLogMessage: ExpressibleByStringInterpolation, ExpressibleBySt package mutating func appendInterpolation(_ number: @autoclosure @escaping () -> Float, format: NoOpLogFloatFormatting = .fixed, align: NoOpLogStringAlignment = .none, privacy: NoOpLogPrivacy = .auto) {} package mutating func appendInterpolation(_ number: @autoclosure @escaping () -> Double, format: NoOpLogFloatFormatting = .fixed, align: NoOpLogStringAlignment = .none, privacy: NoOpLogPrivacy = .auto) {} + // Append errors + package mutating func appendInterpolation(_ error: @autoclosure @escaping () -> any Error, privacy: NoOpLogPrivacy = .auto, attributes: String = "") {} + package mutating func appendInterpolation(_ error: @autoclosure @escaping () -> (any Error)?, privacy: NoOpLogPrivacy = .auto, attributes: String = "") {} + // Add more interpolations here as needed } diff --git a/Tests/SwiftDocCTests/Utility/NoOpSignposterShimTests.swift b/Tests/SwiftDocCTests/Utility/NoOpSignposterShimTests.swift index 66caff16f..403f81d39 100644 --- a/Tests/SwiftDocCTests/Utility/NoOpSignposterShimTests.swift +++ b/Tests/SwiftDocCTests/Utility/NoOpSignposterShimTests.swift @@ -65,5 +65,7 @@ final class NoOpSignposterShimTests: XCTestCase { logger.log(level: .default, "Some aligned values \(12, align: .right(columns: 5)) \("some text", align: .left(columns: 10))") + struct SomeError: Swift.Error {} + logger.error("Some error \(SomeError())") } }