Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

italiano40

macrumors 65816
Original poster
Oct 7, 2007
1,080
0
NY
ok i keep getting that message on the debugger, and i have developed on Cocoa for mac OSX never for the iphone but for catching the exception i used try{
//code

}
@catch(NSException *e){
@throw e;
}
how can i find out what line of code is causing a exception?
 
In most cases the exception itself should tell you enough to narrow it down. That's usually the quickest way. What is the exception?

Or, if that's not enough, you can set breakpoints for exceptions like this:

Code:
fb -[NSException raise]
fb objc_exception_throw

either in your .gdbinit or manually from gdb or the XCode interface. Then you can look at the stack trace for exactly where the exception is being thrown.

BTW, this is exactly the same as you would do in a Mac application. So the same techniques you used previously with the Mac will work here.

Hope that helps.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.