mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-04-23 20:31:13 +08:00
Improving assertion error when attempting to configure an entity mapping for an entity with a nil managed object class
This commit is contained in:
@@ -65,7 +65,7 @@ BOOL RKObjectIsValueEqualToValue(id sourceValue, id destinationValue);
|
||||
{
|
||||
NSAssert(entity, @"Cannot initialize an RKEntityMapping without an entity. Maybe you want RKObjectMapping instead?");
|
||||
Class objectClass = NSClassFromString([entity managedObjectClassName]);
|
||||
NSAssert(objectClass, @"The managedObjectClass for an object mapped entity cannot be nil.");
|
||||
NSAssert(objectClass, @"Cannot initialize an entity mapping for an entity with a nil managed object class: Got nil class for managed object class name '%@'. Maybe you forgot to add the class files to your target?", [entity managedObjectClassName]);
|
||||
self = [self init];
|
||||
if (self) {
|
||||
self.objectClass = objectClass;
|
||||
|
||||
Reference in New Issue
Block a user