English 中文(简体)
步行和捕获量在讲法语时并非例外处理
原标题:try and catch is not handling exception in iphone

i 在出现错误时使用以下代码。 增长不是有效价值,有时是零

@try {
        if(ind.row<[[treeNode flattenElements] count])
        {
            [self.mTableView scrollToRowAtIndexPath:ind atScrollPosition:UITableViewScrollPositionTop animated:YES];
        }


    }
    @catch (NSException *e) {
        NSLog(@"%@",e);

    }   

但是,当该法典实施时,有时会出现这一错误。

Assertion failure in -[NSIndexPath row], /SourceCache/UIKit_Sim/UIKit-1262.60.3/UITableViewSupport.m:1948`

造成这一错误的原因,以及为什么没有处理例外情况

最佳回答

actually it was already catching the exceptions...i had set the flag stop on objc exceptions.when i removed that it catching the exceptions.... as pointed out by @stilesCrisis the ind value was null at the time of this exception..sorry for the trble

问题回答

锡永岛的阿瑟斯 exceptions着例外,因此你可以赶上。

你们需要说明你要求<编码>-row<>/code>的错误。 我的第一gues是,“ind”已经获释或已经获释。

您必须检查该指数、生成和提出自己的例外:rel=“nofollow”

+ (void)raise:(NSString *)name format:(NSString *)format, ...




相关问题
List Contents of Directory in a UITableView

I am trying to list the contents of Ringtones directory in a TableView, however, I am only getting the last file in the directory in ALL cells, instead of file per cell. This is my code: - (...

iPhone NSUserDefaults persistance difficulty

In my app i have a bunch of data i store in the NSUserdefaults. This information consists of an NSObject (Object1) with NSStrings and NSNumbers and also 2 instances of yet another object (Object2). ...

Writing a masked image to disk as a PNG file

Basically I m downloading images off of a webserver and then caching them to the disk, but before I do so I want to mask them. I m using the masking code everyone seems to point at which can be found ...

Resize UIImage with aspect ratio?

I m using this code to resize an image on the iPhone: CGRect screenRect = CGRectMake(0, 0, 320.0, 480.0); UIGraphicsBeginImageContext(screenRect.size); [value drawInRect:screenRect blendMode:...

Allowing interaction with a UIView under another UIView

Is there a simple way of allowing interaction with a button in a UIView that lies under another UIView - where there are no actual objects from the top UIView on top of the button? For instance, ...

热门标签