Core Data Fetch Error
Core Data Fetch Error
- Subject: Core Data Fetch Error
- From: John Bishop <email@hidden>
- Date: Fri, 10 Mar 2006 16:31:24 -0600
I'm doing a fairly simple fetch:
NSFetchRequest *request = [[NSFetchRequest alloc] init];
NSSortDescriptor *sortDescriptor = [[[NSSortDescriptor alloc]
initWithKey:@"countryName" ascending:YES] autorelease];
NSPredicate *searchPredicate = [NSPredicate
predicateWithFormat:@"countryName like[c] %@", searchText];
NSEntityDescription *entity = [NSEntityDescription
entityForName:@"Country" inManagedObjectContext:[self managedObjectContext]];
[request setEntity:entity];
[request setPredicate:searchPredicate];
[request setSortDescriptors:[NSArray arrayWithObject:sortDescriptor]];
NSError *error = nil;
NSArray *countries = [[self managedObjectContext]
executeFetchRequest:request error:&error];
if (error != nil)
[NSException raise:@"CountrySearchError" format:@"Country search
failed - %@", [error localizedDescription]];
[request release];
return countries;
Which fails (intermittently unfortunately) with:
2006-03-10 16:08:23.035 App[2060] Can't do regex matching, reason: Can't open
pattern U_ILLEGAL_ARGUMENT_ERROR (string Korea, pattern , case 1, canon 0)
Yes, I note that the "pattern" seems to be missing in this error message. And
no, the database is not corrupted - this fails on a fairly small set of data
(about 50 "Thing"s).
I'd certainly bet that I have some addressing run amok, but I can't seem to
locate it... I'd like to track it down by finding out how this error happens
(ie: Is this an error raised during the fetch? If so, why doesn't it get
returned in &error?). Has anyone seen this error before?
Thanks.
------------------------------------------------------------------
John Bishop <mailto:email@hidden>
Mulligan Software <http://www.mulligansoftware.com>
Mulligan's Golf Personal - Stats & Handicapping for the Mac Golfer
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden