lpw
2023-07-20 80f7cc0c18ce7e590a4c14cd1011a82b296770f5
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
/*
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 * All rights reserved.
 *
 * This source code is licensed under the license found in the
 * LICENSE file in the root directory of this source tree.
 */
 
#import <Foundation/Foundation.h>
 
NS_ASSUME_NONNULL_BEGIN
 
NS_SWIFT_NAME(ErrorCreating)
@protocol FBSDKErrorCreating
 
// MARK: - General Errors
 
// UNCRUSTIFY_FORMAT_OFF
- (NSError *)errorWithCode:(NSInteger)code
                  userInfo:(nullable NSDictionary<NSErrorUserInfoKey, id> *)userInfo
                   message:(nullable NSString *)message
           underlyingError:(nullable NSError *)underlyingError
NS_SWIFT_NAME(error(code:userInfo:message:underlyingError:));
// UNCRUSTIFY_FORMAT_ON
 
// UNCRUSTIFY_FORMAT_OFF
- (NSError *)errorWithDomain:(NSErrorDomain)domain
                        code:(NSInteger)code
                    userInfo:(nullable NSDictionary<NSErrorUserInfoKey, id> *)userInfo
                     message:(nullable NSString *)message
             underlyingError:(nullable NSError *)underlyingError
NS_SWIFT_NAME(error(domain:code:userInfo:message:underlyingError:));
// UNCRUSTIFY_FORMAT_ON
 
// MARK: - Invalid Argument Errors
 
// UNCRUSTIFY_FORMAT_OFF
- (NSError *)invalidArgumentErrorWithName:(NSString *)name
                                    value:(nullable id)value
                                  message:(nullable NSString *)message
                          underlyingError:(nullable NSError *)underlyingError
NS_SWIFT_NAME(invalidArgumentError(name:value:message:underlyingError:));
// UNCRUSTIFY_FORMAT_ON
 
// UNCRUSTIFY_FORMAT_OFF
- (NSError *)invalidArgumentErrorWithDomain:(NSErrorDomain)domain
                                       name:(NSString *)name
                                      value:(nullable id)value
                                    message:(nullable NSString *)message
                            underlyingError:(nullable NSError *)underlyingError
NS_SWIFT_NAME(invalidArgumentError(domain:name:value:message:underlyingError:));
// UNCRUSTIFY_FORMAT_ON
 
// MARK: - Required Argument Errors
 
// UNCRUSTIFY_FORMAT_OFF
- (NSError *)requiredArgumentErrorWithName:(NSString *)name
                                   message:(nullable NSString *)message
                           underlyingError:(nullable NSError *)underlyingError
NS_SWIFT_NAME(requiredArgumentError(name:message:underlyingError:));
// UNCRUSTIFY_FORMAT_ON
 
// UNCRUSTIFY_FORMAT_OFF
- (NSError *)requiredArgumentErrorWithDomain:(NSErrorDomain)domain
                                        name:(NSString *)name
                                     message:(nullable NSString *)message
                             underlyingError:(nullable NSError *)underlyingError
  NS_SWIFT_NAME(requiredArgumentError(domain:name:message:underlyingError:));
// UNCRUSTIFY_FORMAT_ON
 
// MARK: - Unknown Errors
 
// UNCRUSTIFY_FORMAT_OFF
- (NSError *)unknownErrorWithMessage:(nullable NSString *)message
                            userInfo:(nullable NSDictionary<NSErrorUserInfoKey, id> *)userInfo
NS_SWIFT_NAME(unknownError(message:userInfo:));
// UNCRUSTIFY_FORMAT_ON
 
@end
 
NS_ASSUME_NONNULL_END