hank
2018-05-26 734ae8ad03b6868930068048746438a5336e9ebd
commit | author | age
dcdc07 1 //
W 2 //  GHWSDKShareError.h
3 //  GHWSdkUI
4 //
5 //  Created by wuyx on 15/6/12.
6 //  Copyright (c) 2015年 GHW-T-01. All rights reserved.
7 //
8
9 #import <Foundation/Foundation.h>
10 #import "WAErrorCode.h"
11
12 @interface WAError : NSObject
13 + (NSString *)errorDomain;
14
15 + (BOOL)errorIsNetworkError:(NSError *)error;
16
17 + (NSError *)errorWithCode:(NSInteger)code message:(NSString *)message;
18 + (NSError *)errorWithCode:(NSInteger)code message:(NSString *)message underlyingError:(NSError *)underlyingError;
19 + (NSError *)errorWithCode:(NSInteger)code
20                   userInfo:(NSDictionary *)userInfo
21                    message:(NSString *)message
22            underlyingError:(NSError *)underlyingError;
23
24 + (NSError *)invalidArgumentErrorWithName:(NSString *)name value:(id)value message:(NSString *)message;
25 + (NSError *)invalidArgumentErrorWithName:(NSString *)name
26                                     value:(id)value
27                                   message:(NSString *)message
28                           underlyingError:(NSError *)underlyingError;
29 + (NSError *)invalidCollectionErrorWithName:(NSString *)name
30                                  collection:(id<NSFastEnumeration>)collection
31                                        item:(id)item
32                                     message:(NSString *)message;
33 + (NSError *)invalidCollectionErrorWithName:(NSString *)name
34                                  collection:(id<NSFastEnumeration>)collection
35                                        item:(id)item
36                                     message:(NSString *)message
37                             underlyingError:(NSError *)underlyingError;
38
39 + (NSError *)requiredArgumentErrorWithName:(NSString *)name message:(NSString *)message;
40 + (NSError *)requiredArgumentErrorWithName:(NSString *)name
41                                    message:(NSString *)message
42                            underlyingError:(NSError *)underlyingError;
43
44 + (NSError *)unknownErrorWithMessage:(NSString *)message;
45 @end