Skip to content

Commit 8b202e9

Browse files
committed
Add static errorDescription requirement to FetchableUnmanagedModel
fix-incorrect-error-descriptions
1 parent 47de46c commit 8b202e9

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

Sources/CoreDataRepository/FetchableUnmanagedModel.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ public protocol FetchableUnmanagedModel: Sendable {
7070

7171
/// A description of the context from where an error is thrown
7272
var errorDescription: String { get }
73+
74+
/// A description of the context from where an error is thrown but there is no instance `self` to use
75+
static var errorDescription: String { get }
7376
}
7477

7578
extension FetchableUnmanagedModel {
@@ -85,4 +88,9 @@ extension FetchableUnmanagedModel {
8588
public var errorDescription: String {
8689
"\(Self.self)"
8790
}
91+
92+
@inlinable
93+
public static var errorDescription: String {
94+
"\(Self.self)"
95+
}
8896
}

0 commit comments

Comments
 (0)