ZYLNetworkError.m 574 B

123456789101112131415161718192021
  1. //
  2. // ZYLNetworkError.m
  3. // Starbuds
  4. //
  5. // Created by 翟玉磊 on 2019/12/23.
  6. // Copyright © 2019 翟玉磊. All rights reserved.
  7. //
  8. #import "ZYLNetworkError.h"
  9. @implementation ZYLNetworkError
  10. + (instancetype)errorWithDomain:(NSErrorDomain)domain code:(NSInteger)code codeStr:(NSString *)codeStr userInfo:(nullable NSDictionary<NSErrorUserInfoKey, id> *)dict {
  11. domain = kLocalizedString(domain);
  12. ZYLNetworkError *error = [super errorWithDomain:domain code:code userInfo:dict];
  13. if (error) {
  14. error.codeStr = codeStr;
  15. }
  16. return error;
  17. }
  18. @end