mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-03-31 14:43:09 +02:00
custom error handling, logging, and asserting
This commit is contained in:
@@ -30,7 +30,7 @@ public extension NSManagedObject {
|
||||
|
||||
public class var entityName: String {
|
||||
|
||||
return self.className().componentsSeparatedByString(".").last!
|
||||
return NSStringFromClass(self).componentsSeparatedByString(".").last!
|
||||
}
|
||||
|
||||
public class func createInContext(context: NSManagedObjectContext) -> Self {
|
||||
@@ -49,7 +49,7 @@ public extension NSManagedObject {
|
||||
|
||||
HardcoreData.handleError(
|
||||
permanentIDError!,
|
||||
message: "Failed to obtain permanent ID for object.")
|
||||
"Failed to obtain permanent ID for object.")
|
||||
return nil
|
||||
}
|
||||
}
|
||||
@@ -62,7 +62,7 @@ public extension NSManagedObject {
|
||||
|
||||
HardcoreData.handleError(
|
||||
existingObjectError!,
|
||||
message: "Failed to load existing NSManagedObject in context.")
|
||||
"Failed to load existing NSManagedObject in context.")
|
||||
return nil;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user