Skip to content
This repository has been archived by the owner on Jan 5, 2024. It is now read-only.

Commit

Permalink
Improve error reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
Luigi Parpinel committed Feb 7, 2019
1 parent 966b8f2 commit ddad7af
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class CoreDataAccessor: NSObject {
enum ErrorCode: Int {
case itemIsNotFromAccessorsDataStore
case itemIsNotCompatibleWithAccessorsDataStore
case itemBatchDeletionFailsWithAccessorsDataStore
}

enum ErrorUserInfoKey: String {
Expand Down Expand Up @@ -182,7 +183,7 @@ extension CoreDataAccessor: DataStoreReadWriteAccessor {
let deletedObjectsIds = result?.result as? [NSManagedObjectID] ?? []
changedManagedObjectsIds.append(contentsOf: deletedObjectsIds)
} catch {
assert(false, "This should be a programmatic error")
reportError(withCode: ErrorCode.itemBatchDeletionFailsWithAccessorsDataStore, andRelevantItemType: itemType)
}
}

Expand Down

0 comments on commit ddad7af

Please sign in to comment.