好吧,想象一下我的断点objc_exception_throw刚刚触发.我正坐在调试器提示符下,我想获得有关异常对象的更多信息.我在哪里找到它?
我在Xcode 4.5.1上.我认为这是我看到的相对较新的行为.
我更喜欢在启用"All Exceptions"断点的情况下开发和测试我的项目.
我一直在遇到一个场景,我正在将缩略图图片加载到tableview中的单元格,在这里我得到一个__cxa_throw异常.当我点击"继续执行程序"按钮时,Xcode继续它的快乐方式.我得到了缩略图.应用似乎工作正常.我正在寻找一些关于如何确定这是否可以安全忽略的提示.就像了解堆栈跟踪的一些指示一样?或者是其他东西?
以下是代码片段:
NSString *imageStr = item.thumbURL;
imageStr = [imageStr stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
NSURL *imageURL;
if (![imageStr isEqualToString:@""]) {
imageURL = [NSURL URLWithString:imageStr];
NSLog(@"imageURL: %@",imageURL);
if (imageURL == nil) {
NSLog(@"imageUrl was nil for string: %@",imageStr);
} else {
UIActivityIndicatorView *spinner = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];
//spinner.frame = CGRectMake(cell.imageView.frame.size.width/2,cell.imageView.frame.origin.y + cell.imageView.frame.size.height/2,cell.imageView.frame.size.width,cell.imageView.frame.size.height);
spinner.frame = CGRectMake(10,20,40,40);
[spinner startAnimating];
[cell addSubview:spinner];
dispatch_queue_t downloadQueue = dispatch_queue_create("thumbnail downloader", NULL);
dispatch_async(downloadQueue, ^{
NSLog(@"Network request for tour_thumb image: %@",imageStr);
UIImage *img = [[UIImage alloc] initWithData:[NSData dataWithContentsOfURL:imageURL]];
dispatch_async(dispatch_get_main_queue(), …Run Code Online (Sandbox Code Playgroud)