Skip to content

Commit

Permalink
Add custom error logging
Browse files Browse the repository at this point in the history
  • Loading branch information
KaQuMiQ authored Jul 28, 2023
1 parent 4058168 commit 134539f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Sources/MQ/Errors/TheError.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,15 @@ public protocol TheError: Error, CustomStringConvertible, CustomDebugStringConve
func isEqual(
to other: Error
) -> Bool
/// Log this error.
///
/// Logging is provided by this method implemetation.
/// Default uses ``Diagnostics.shared`` instance with description
/// or debugDescription in message content.
///
/// - Returns: The same error instance.
@discardableResult
@Sendable func log() -> Self
}

// swift-format-ignore: AllPublicDeclarationsHaveDocumentation
Expand Down

0 comments on commit 134539f

Please sign in to comment.