nsexception

iPhone UI addSubview causing concurrency exception

This is really odd... I run my app, and while it is opening and the views are constructing I get: Collection <CALayerArray: 0x124650> was mutated while being enumerated. The code trace goes through the following: main UIApplicationMain -[UIApplication _run] CFRunLoopRunInMode CFRunLoopRunSpecific _UIApplicationHandleEvent -[UIApplic...

Core Data: Errors vs Exceptions Part 2

My question is similar to this one, but I need further clarification. I often get exceptions during code like this: NSError* error; if (![managedObjectContext save:&error]) { NSLog(@"Failed to save to data store: %@", [error localizedDescription]); } However, when I put a breakpoint in objc_exception_throw, I can find out that an ...

Problems after editing ~/.gdbinit

I put this in my .gdbinit after seeing it on CocoaDev: fb -[NSException raise] fb -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] fb -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] #define NSZombies # this will give you help messages. Set to NO to turn them off. set env Malloc...

CoreData: NSManagedObject does not respond to user defined message

Using CoreData (on an iPhone app) I generated my entity classes from the model and I added some more methods to some ones. It appears that sometimes I get an exception for calling one of those methods. The exception is not random but concerns only some ManagedObject subclass (the others seem to respond correctly). Here is an example of w...

@try - catch block in Objective-c problem

Hi, Why @try block do not work? It crash the app, but it was supposed to be catch by the @try block NSString* test = [NSString stringWithString:@"ss"]; @try { [test characterAtIndex:6]; } @catch (NSException * e) { NSLog(@"Exception: %@", e); } @finally { NSLog(@"finally"); } Thanks, Alex. ...

How to find instance by hex in XCode console?

When I bring up console after my iPhone app crashes, it often says "unrecognized selector sent to instance 0x blah blah blah." How can I find out what variable this is? Is there a way in the debugger? Is it even possible? Thanks. ...

how do I catch a NSRangeException?

I want my app to continue gracefully when the online server messes up. I tried to wrap the dangerous line in a @try block. Yet it is still crashing like so: the method: + (NSArray *)findAllFor:(NSObject *)ratable { NSString *ratingsPath = [NSString stringWithFormat:@"%@%@/%@/%@%@", [self getRemoteSite], [ratable getRemo...

Try Catch Statement doesn't work on Simulator (but works on iPhone!!!)

Hi I have an Exception catching statement in my code, like the following: @try { for(NSDictionary* s in users) { do something .... } } @catch (NSException * exception) { NSLog(@"APIRequesetBase readUserInfo: Caught %@: %@", [exception name], [exception reason]); } @finally { } So this try stat...

XCODE iPhone Error NSInvalidArgumentException

Hello. I do not understand what is this error. i tried some stuffs, i looked over, but nothing helped me. here is the code of the error : 2010-08-13 14:37:37.587 iPilulier[6520:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'executeFetchRequest:error: A fetch request must have an entity.' ... ...

terminate called after throwing an instance of 'NSException'

I am trying to call a page that contains a picker. My app is killed as soon as I select the button that used to call my picker page. Not sure what is causing this error - "terminate called after throwing an instance of 'NSException' Program received signal: “SIGABRT”." Does anyone have a clue? I have provided the information that I ...

import a .xcdatamodel in CoreData CLI

Hi all, i've a little Problem with a CoreData Command Line Tool. I simply created a new Project in XCode (Core Data CLI), created a Data Model in the .xcdatamodel File and auto generated a Header file. Finaly i modified the Code, wich should able to load the Entity. The Program Compiles without errors, but if i run the Program i get th...

does iphone os framework throw NSException itself?

I know i can throw an NSException in my own code,does iphone os framework throw NSException itself? if it does,means that i should catch the NSExceptions from framework? I know Java throws Exceptions inner SDK,such as unchecked exceptions. ...

why I can not catch the NSInvalidArgumentException in iphone os?

@try { NSString *a = [NSString string]; [a ggg]; } @catch (NSException * e) { self.user_name = nil; } why I can not catch the NSInvalidArgumentException in iphone os? ...

(nsexception *ex)

Is there anything other than *ex for nsexception? The developer library doesn't even mention using *ex. I'm new to obj c, with php, I would just go to php.net to see examples on how to use classes . Is there a resource like that for obj c? The apple class reference is great, but if you haven't really done any coding in obj c it's ...