自定义NSError
作者:互联网
domain:错误域 code:错误编码 userInfo:错误原因 NSString *domain = @"xxxxxx"; NSString *desc = NSLocalizedString(@"xxx", @"xxx");//NSLocalizedString国际化 NSDictionary *userInfo = @{NSLocalizedDescriptionKey : desc }; NSError *error = [NSError errorWithDomain:domain code:-101 userInfo:userInfo];
标签:domain,code,自定义,xxx,NSLocalizedString,userInfo,NSError 来源: https://www.cnblogs.com/lulushen/p/10689677.html