lpw
2022-06-21 2174b5a6ded53c5dc12296c9e08f0bdd56e98376
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
//
//  GHWSDKShareError.h
//  GHWSdkUI
//
//  Created by wuyx on 15/6/12.
//  Copyright (c) 2015年 GHW-T-01. All rights reserved.
//
 
#import <Foundation/Foundation.h>
#import "WAErrorCode.h"
 
@interface WAError : NSObject
+ (NSString *)errorDomain;
 
+ (BOOL)errorIsNetworkError:(NSError *)error;
 
+ (NSError *)errorWithCode:(NSInteger)code message:(NSString *)message;
+ (NSError *)errorWithCode:(NSInteger)code message:(NSString *)message underlyingError:(NSError *)underlyingError;
+ (NSError *)errorWithCode:(NSInteger)code
                  userInfo:(NSDictionary *)userInfo
                   message:(NSString *)message
           underlyingError:(NSError *)underlyingError;
 
+ (NSError *)invalidArgumentErrorWithName:(NSString *)name value:(id)value message:(NSString *)message;
+ (NSError *)invalidArgumentErrorWithName:(NSString *)name
                                    value:(id)value
                                  message:(NSString *)message
                          underlyingError:(NSError *)underlyingError;
+ (NSError *)invalidCollectionErrorWithName:(NSString *)name
                                 collection:(id<NSFastEnumeration>)collection
                                       item:(id)item
                                    message:(NSString *)message;
+ (NSError *)invalidCollectionErrorWithName:(NSString *)name
                                 collection:(id<NSFastEnumeration>)collection
                                       item:(id)item
                                    message:(NSString *)message
                            underlyingError:(NSError *)underlyingError;
 
+ (NSError *)requiredArgumentErrorWithName:(NSString *)name message:(NSString *)message;
+ (NSError *)requiredArgumentErrorWithName:(NSString *)name
                                   message:(NSString *)message
                           underlyingError:(NSError *)underlyingError;
 
+ (NSError *)unknownErrorWithMessage:(NSString *)message;
@end