Reputation: 5510
I am trying to fetch the values I have saved into my core data object, However I am getting this error
Use of undeclared identifier 'error'
This is pointing to the spot where I refrence &error in the below peace of code
// Test listing all FailedBankInfos from the store
NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init];
NSEntityDescription *entity = [NSEntityDescription entityForName:@"Manuf" inManagedObjectContext:context];
[fetchRequest setEntity:entity];
NSArray *fetchedObjects = [context executeFetchRequest:fetchRequest error:&error];
for (Manuf *manuf in fetchedObjects) {
// Log all of the values in the object
}
Any help would be appreciated
Upvotes: 0
Views: 125
Reputation: 6626
You need to declare the error before you pass a reference to its location in the executeFetchRequest
.
Like so:
NSError *error;
Upvotes: 4