9 static NSString* KCErrorDomain = @"com.apple.security.keychaincircle";
12 @implementation NSError(KCJoiningError)
14 + (nonnull instancetype) errorWithJoiningError:(KCJoiningError) code
15 format:(NSString*) format
16 arguments:(va_list) va {
17 return [[NSError alloc] initWithJoiningError:code
18 userInfo:@{NSLocalizedDescriptionKey:[[NSString alloc] initWithFormat:format arguments:va]}];
22 + (nonnull instancetype) errorWithJoiningError:(KCJoiningError) code
23 format:(NSString*) format, ... {
27 NSError* result = [NSError errorWithJoiningError:code format:format arguments:va];
33 - (nonnull instancetype) initWithJoiningError:(KCJoiningError) code
34 userInfo:(nonnull NSDictionary *)dict {
35 return [self initWithDomain:KCErrorDomain code:code userInfo:dict];
39 void KCJoiningErrorCreate(KCJoiningError code, NSError** error, NSString* format, ...) {
40 if (error && (*error == nil)) {
43 *error = [NSError errorWithJoiningError:code format:format arguments:va];