【发布时间】:2023-03-05 22:45:01
【问题描述】:
现在用户只会收到类似“错误代码 5”这样的错误消息。
NSString *errorString = [NSString stringWithFormat:@"Error code %i", [parseError code]];
UIAlertView *errorAlert = [[UIAlertView alloc] initWithTitle:@"Error loading content" message:errorString delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
[errorAlert show];
所以 NSXMLParserError 代码对我来说是不够的。我更喜欢“NSXMLParserPrematureDocumentEndError”或“文档意外结束”之类的内容。
有没有简单的方法可以做到这一点?
干杯
【问题讨论】:
标签: iphone objective-c xcode nsxmlparser