commit | author | age
|
2e29a3
|
1 |
/* |
L |
2 |
* Copyright (c) Meta Platforms, Inc. and affiliates. |
|
3 |
* All rights reserved. |
|
4 |
* |
|
5 |
* This source code is licensed under the license found in the |
|
6 |
* LICENSE file in the root directory of this source tree. |
|
7 |
*/ |
|
8 |
|
|
9 |
#import <Foundation/Foundation.h> |
|
10 |
|
|
11 |
NS_ASSUME_NONNULL_BEGIN |
|
12 |
|
|
13 |
NS_SWIFT_NAME(ErrorCreating) |
|
14 |
@protocol FBSDKErrorCreating |
|
15 |
|
|
16 |
// MARK: - General Errors |
|
17 |
|
|
18 |
// UNCRUSTIFY_FORMAT_OFF |
|
19 |
- (NSError *)errorWithCode:(NSInteger)code |
|
20 |
userInfo:(nullable NSDictionary<NSErrorUserInfoKey, id> *)userInfo |
|
21 |
message:(nullable NSString *)message |
|
22 |
underlyingError:(nullable NSError *)underlyingError |
|
23 |
NS_SWIFT_NAME(error(code:userInfo:message:underlyingError:)); |
|
24 |
// UNCRUSTIFY_FORMAT_ON |
|
25 |
|
|
26 |
// UNCRUSTIFY_FORMAT_OFF |
|
27 |
- (NSError *)errorWithDomain:(NSErrorDomain)domain |
|
28 |
code:(NSInteger)code |
|
29 |
userInfo:(nullable NSDictionary<NSErrorUserInfoKey, id> *)userInfo |
|
30 |
message:(nullable NSString *)message |
|
31 |
underlyingError:(nullable NSError *)underlyingError |
|
32 |
NS_SWIFT_NAME(error(domain:code:userInfo:message:underlyingError:)); |
|
33 |
// UNCRUSTIFY_FORMAT_ON |
|
34 |
|
|
35 |
// MARK: - Invalid Argument Errors |
|
36 |
|
|
37 |
// UNCRUSTIFY_FORMAT_OFF |
|
38 |
- (NSError *)invalidArgumentErrorWithName:(NSString *)name |
|
39 |
value:(nullable id)value |
|
40 |
message:(nullable NSString *)message |
|
41 |
underlyingError:(nullable NSError *)underlyingError |
|
42 |
NS_SWIFT_NAME(invalidArgumentError(name:value:message:underlyingError:)); |
|
43 |
// UNCRUSTIFY_FORMAT_ON |
|
44 |
|
|
45 |
// UNCRUSTIFY_FORMAT_OFF |
|
46 |
- (NSError *)invalidArgumentErrorWithDomain:(NSErrorDomain)domain |
|
47 |
name:(NSString *)name |
|
48 |
value:(nullable id)value |
|
49 |
message:(nullable NSString *)message |
|
50 |
underlyingError:(nullable NSError *)underlyingError |
|
51 |
NS_SWIFT_NAME(invalidArgumentError(domain:name:value:message:underlyingError:)); |
|
52 |
// UNCRUSTIFY_FORMAT_ON |
|
53 |
|
|
54 |
// MARK: - Required Argument Errors |
|
55 |
|
|
56 |
// UNCRUSTIFY_FORMAT_OFF |
|
57 |
- (NSError *)requiredArgumentErrorWithName:(NSString *)name |
|
58 |
message:(nullable NSString *)message |
|
59 |
underlyingError:(nullable NSError *)underlyingError |
|
60 |
NS_SWIFT_NAME(requiredArgumentError(name:message:underlyingError:)); |
|
61 |
// UNCRUSTIFY_FORMAT_ON |
|
62 |
|
|
63 |
// UNCRUSTIFY_FORMAT_OFF |
|
64 |
- (NSError *)requiredArgumentErrorWithDomain:(NSErrorDomain)domain |
|
65 |
name:(NSString *)name |
|
66 |
message:(nullable NSString *)message |
|
67 |
underlyingError:(nullable NSError *)underlyingError |
|
68 |
NS_SWIFT_NAME(requiredArgumentError(domain:name:message:underlyingError:)); |
|
69 |
// UNCRUSTIFY_FORMAT_ON |
|
70 |
|
|
71 |
// MARK: - Unknown Errors |
|
72 |
|
|
73 |
// UNCRUSTIFY_FORMAT_OFF |
|
74 |
- (NSError *)unknownErrorWithMessage:(nullable NSString *)message |
|
75 |
userInfo:(nullable NSDictionary<NSErrorUserInfoKey, id> *)userInfo |
|
76 |
NS_SWIFT_NAME(unknownError(message:userInfo:)); |
|
77 |
// UNCRUSTIFY_FORMAT_ON |
|
78 |
|
|
79 |
@end |
|
80 |
|
|
81 |
NS_ASSUME_NONNULL_END |