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
8 changes: 7 additions & 1 deletion Sources/ContainerizationError/ContainerizationError.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@
// limitations under the License.
//===----------------------------------------------------------------------===//

import Foundation

/// The core error type for Containerization.
///
/// Most API surfaces for the core container/process/agent types will
/// return a ContainerizationError.
public struct ContainerizationError: Swift.Error, Sendable {
public struct ContainerizationError: Swift.Error, LocalizedError, Sendable {
/// A code describing the error encountered.
public var code: Code
/// A description of the error.
Expand Down Expand Up @@ -65,6 +67,10 @@ public struct ContainerizationError: Swift.Error, Sendable {
public func isCode(_ code: Code) -> Bool {
self.code == code
}

public var errorDescription: String? {
message
}
}

extension ContainerizationError: CustomStringConvertible {
Expand Down