File tree Expand file tree Collapse file tree
Sources/CoreDataRepository Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -32,11 +32,15 @@ extension IdentifiedUnmanagedModel {
3232 let fetchResult = try context. fetch ( request)
3333 guard let managed = fetchResult. first, fetchResult. count == 1 else {
3434 throw CoreDataError
35- . noMatchFoundWhenReadingItem ( description: " \( Self . self) -- id: \( errorDescription ( for: id) ) " )
35+ . noMatchFoundWhenReadingItem (
36+ description: " \( Self . errorDescription) -- id: \( errorDescription ( for: id) ) "
37+ )
3638 }
3739 guard !managed. isDeleted else {
3840 throw CoreDataError
39- . fetchedObjectIsFlaggedAsDeleted ( description: " \( Self . self) -- id: \( errorDescription ( for: id) ) " )
41+ . fetchedObjectIsFlaggedAsDeleted (
42+ description: " \( Self . errorDescription) -- id: \( errorDescription ( for: id) ) "
43+ )
4044 }
4145 return managed
4246 }
Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ extension ReadableUnmanagedModel where Self: ManagedIdReferencable {
8080 @inlinable
8181 public func readManaged( from context: NSManagedObjectContext ) throws -> ManagedModel {
8282 guard let managedId else {
83- throw CoreDataError . noObjectIdOnItem ( description: " \( Self . self ) " )
83+ throw CoreDataError . noObjectIdOnItem ( description: errorDescription )
8484 }
8585 return try context. notDeletedObject ( for: managedId) . asManagedModel ( )
8686 }
@@ -90,7 +90,7 @@ extension ReadableUnmanagedModel where Self: ManagedIdUrlReferencable {
9090 @inlinable
9191 public func readManaged( from context: NSManagedObjectContext ) throws -> ManagedModel {
9292 guard let managedIdUrl else {
93- throw CoreDataError . noUrlOnItemToMapToObjectId ( description: " \( Self . self ) " )
93+ throw CoreDataError . noUrlOnItemToMapToObjectId ( description: errorDescription )
9494 }
9595 let managedId = try context. objectId ( from: managedIdUrl) . get ( )
9696 return try context. notDeletedObject ( for: managedId) . asManagedModel ( )
You can’t perform that action at this time.
0 commit comments