Revision: 30082
          http://sourceforge.net/p/bibdesk/svn/30082
Author:   hofman
Date:     2026-02-28 16:57:21 +0000 (Sat, 28 Feb 2026)
Log Message:
-----------
remove convenience initializer

Modified Paths:
--------------
    trunk/bibdesk/NSError_BDSKExtensions.m

Modified: trunk/bibdesk/NSError_BDSKExtensions.m
===================================================================
--- trunk/bibdesk/NSError_BDSKExtensions.m      2026-02-28 16:48:35 UTC (rev 
30081)
+++ trunk/bibdesk/NSError_BDSKExtensions.m      2026-02-28 16:57:21 UTC (rev 
30082)
@@ -60,15 +60,6 @@
     return self;
 }
 
-- (instancetype)initLocalErrorWithCode:(NSInteger)code 
localizedDescription:(NSString *)description;
-{
-    self = [self initWithDomain:[NSError localErrorDomain] code:code 
userInfo:nil];
-    if (self) {
-        [self setValue:description forKey:NSLocalizedDescriptionKey];
-    }
-    return self;
-}
-
 - (id)copyWithZone:(NSZone *)aZone
 {
     return [[NSError alloc] initWithDomain:[self domain] code:[self code] 
userInfo:[self userInfo]];
@@ -130,19 +121,20 @@
     return [[self alloc] initWithDomain:[NSError localErrorDomain] code:code 
userInfo:userInfo];
 }
 
-+ (instancetype)mutableLocalErrorWithCode:(NSInteger)code 
localizedDescription:(NSString *)description;
++ (instancetype)mutableErrorWithDomain:(NSString *)domain code:(NSInteger)code 
userInfo:(NSDictionary *)dict;
 {
-    return [[BDSKMutableError alloc] initLocalErrorWithCode:code 
localizedDescription:description];
+    return [[BDSKMutableError alloc] initWithDomain:domain code:code 
userInfo:dict];
 }
 
-+ (instancetype)mutableErrorWithDomain:(NSString *)domain code:(NSInteger)code 
userInfo:(NSDictionary *)dict;
++ (instancetype)mutableLocalErrorWithCode:(NSInteger)code 
localizedDescription:(NSString *)description;
 {
-    return [[BDSKMutableError alloc] initWithDomain:domain code:code 
userInfo:dict];
+    NSDictionary *userInfo = description ? @{NSLocalizedDescriptionKey: 
description} : nil;
+    return [[BDSKMutableError alloc] initWithDomain:[NSError localErrorDomain] 
code:code userInfo:userInfo];
 }
 
 + (instancetype)mutableLocalErrorWithCode:(NSInteger)code 
localizedDescription:(NSString *)description underlyingError:(NSError 
*)underlyingError;
 {
-    id error = [NSError mutableLocalErrorWithCode:code 
localizedDescription:description];
+    NSError *error = [NSError mutableLocalErrorWithCode:code 
localizedDescription:description];
     [error setValue:underlyingError forKey:NSUnderlyingErrorKey];
     return error;
 }

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit

Reply via email to