Skip to content
This repository
Browse code

use standard error api

  • Loading branch information...
commit 68ce23df93d544021fce584ad284d662ee230694 1 parent 4d6d073
Colin Wheeler authored April 04, 2013

Showing 1 changed file with 6 additions and 4 deletions. Show diff stats Hide diff stats

  1. 10  Source/NSManagedObjectContextAdditions.m
10  Source/NSManagedObjectContextAdditions.m
@@ -84,10 +84,12 @@ -(NSUInteger)cw_countForEntity:(NSString *)entityName
84 84
 									 error:error];
85 85
 		return count;
86 86
 	}
87  
-	CWErrorSet(kNSManagedObjectContextAdditionsDomain,
88  
-			   990,
89  
-			   [NSString stringWithFormat:@"Could not find an etity of name %@",entityName],
90  
-			   error);
  87
+	if (error) {
  88
+		*error = [NSError errorWithDomain:kNSManagedObjectContextAdditionsDomain
  89
+									 code:990 userInfo:@{
  90
+				 NSLocalizedFailureReasonErrorKey : [NSString stringWithFormat:@"Could not find an entity of name %@",entityName]
  91
+				  }];
  92
+	}
91 93
 	return 0;
92 94
 }
93 95
 

0 notes on commit 68ce23d

Please sign in to comment.
Something went wrong with that request. Please try again.