TAIError.h 770 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. //
  2. // TAIError.h
  3. // TAISDK
  4. //
  5. // Created by kennethmiao on 2018/12/4.
  6. // Copyright © 2018年 kennethmiao. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. typedef NS_ENUM(NSInteger, TAIErrCode)
  10. {
  11. /*
  12. 成功
  13. */
  14. TAIErrCode_Succ = 0,
  15. /*
  16. 参数错误
  17. */
  18. TAIErrCode_Param,
  19. /*
  20. json解析错误
  21. */
  22. TAIErrCode_Json,
  23. /*
  24. http请求错误
  25. */
  26. TAIErrCode_Https,
  27. /*
  28. 服务器错误
  29. */
  30. TAIErrCode_Server,
  31. };
  32. @interface TAIError : NSObject
  33. @property (nonatomic, assign) TAIErrCode code;
  34. @property (nonatomic, strong) NSString *desc;
  35. @property (nonatomic, strong) NSString *requestId;
  36. + (id)errorCode:(NSInteger)code desc:(NSString *)desc requestId:(NSString *)requestId;
  37. @end