Skip to content
This repository was archived by the owner on May 8, 2020. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions DCTCoreDataStack/NSManagedObjectContext+DCTCoreDataStack.m
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ - (void)dct_saveWithCompletionHandler:(void(^)(BOOL success, NSError *error))com

if (completionHandler != NULL)
completionHandler(success, error);
else if (!success)
NSLog(@"%@", [self dct_detailedDescriptionFromValidationError:error]);
}

- (NSString *)dct_detailedDescriptionFromValidationError:(NSError *)anError {
Expand Down
5 changes: 4 additions & 1 deletion DCTCoreDataStack/_DCTCDSManagedObjectContext.m
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,10 @@ - (BOOL)save:(NSError * __autoreleasing *)error {

- (void)dct_saveWithCompletionHandler:(void(^)(BOOL success, NSError *error))completion {

if (completion == NULL) completion = ^(BOOL success, NSError *error) {};
if (completion == NULL) completion = ^(BOOL success, NSError *error) {
if (!success)
NSLog(@"%@", [self dct_detailedDescriptionFromValidationError:error]);
};

#if TARGET_OS_IPHONE

Expand Down