Partially converted to modern Objective-C

Signed-off-by: michael starke <michael.starke@hicknhack-software.com>
This commit is contained in:
michael starke
2015-10-23 19:14:05 +02:00
parent 4c91a55410
commit 0b073b96e0
5 changed files with 15 additions and 4 deletions

View File

@@ -13,7 +13,7 @@ NSString *const MPErrorDomain = @"com.hicknhack.macpass.error";
@implementation NSError (Messages)
- (NSString *)descriptionForErrorCode {
return [NSString stringWithFormat:@"%@ (%ld)", [self localizedDescription], [self code] ];
return [NSString stringWithFormat:@"%@ (%ld)", self.localizedDescription, self.code ];
}
+ (NSError *)errorWithCode:(NSInteger)code description:(NSString *)description {