-
Notifications
You must be signed in to change notification settings - Fork 13
/
NSErrorX.h
32 lines (25 loc) · 977 Bytes
/
NSErrorX.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
//
// NSErrorX.h
//
// Copyright (c) 2014 Anthony Shoumikhin. All rights reserved under MIT license.
// mailto:[email protected]
//
#import <Foundation/Foundation.h>
@interface NSError (X)
/**
Get a friendly human-readable localized description by domain and error code.
@return A human-readable localized error description. Returns nil if the domain
or error code is unknown (not standard values).
*/
- (NSString *)friendlyLocalizedDescription;
/**
Creates and initializes an NSError object for a given domain and code with
a friendly human-readable localized description.
@param domain The error domain.
@param code The error code for the error.
@return An NSError object for domain with the specified error code and a
friendly human-readable localized description. The description is nil
if the given domain or code is not standard.
*/
+ (instancetype)friendlyErrorWithDomain:(NSString *)domain andCode:(NSInteger)code;
@end