Files
luma/Sources/LumaCore/LumaCoreError.swift
Ole André Vadla Ravnås 127280896e core: Surface real LumaCoreError message
Conform LumaCoreError to LocalizedError so the embedded
message reaches the UI, instead of the opaque
'LumaCore.LumaCoreError error 1' that Foundation produces by
default. Now the user sees, e.g., 'Package 'objc' not found in
install result' and knows what to fix.
2026-05-22 13:48:57 +02:00

19 lines
482 B
Swift

import Foundation
public enum LumaCoreError: LocalizedError {
case invalidArgument(String)
case invalidOperation(String)
case protocolViolation(String)
case notSupported(String)
public var errorDescription: String? {
switch self {
case .invalidArgument(let message),
.invalidOperation(let message),
.protocolViolation(let message),
.notSupported(let message):
return message
}
}
}