// // ZYLNetworkTaskError.h // NetworkLayerBuild // // Created by 翟玉磊 on 2017/9/1. // Copyright © 2017年 翟玉磊. All rights reserved. // #ifndef ZYLNetworkTaskError_h #define ZYLNetworkTaskError_h #define REQUEST_SUCCESS 0 typedef enum : NSInteger { ZYLNetworkTaskErrorAccountFailure = -2, //账号失效 ZYLNetworkTaskErrorTimeout = 101, ZYLNetworkTaskErrorCannotConnectedToInternet = 102, ZYLNetworkTaskErrorCanceled = 103, ZYLNetworkTaskErrorDefault = 104, ZYLNetworkTaskErrorNoData = 105, ZYLNetworkTaskErrorNOMoreData = 106 } ZYLNetworkTaskError; static ZYLNetworkError *ZYLError(NSString *domain, int code, NSString *codeStr) { return [ZYLNetworkError errorWithDomain:(domain ? domain : @"") code:code codeStr:codeStr userInfo:nil]; } static NSString *ZYLAccountFailureErrorNotice = @"请先登录。"; static NSString *ZYLNoDataErrorNotice = @"这里什么也没有。"; static NSString *ZYLNetworkErrorNotice = @"当前网络差, 请检查网络设置。"; static NSString *ZYLTimeoutErrorNotice = @"请求超时了。"; static NSString *ZYLDefaultErrorNotice = @"请求失败了。"; static NSString *ZYLNoMoreDataErrorNotice = @"~ 持续更新中。"; #endif /* ZYLNetworkTaskError_h */