ios - Is it possible to get which class thrown the exception? -


is possible class thrown exception @ runtime?

if so, how it?

what want detect class did throw exception. i'm using nssetuncaughtexceptionhandler(nsuncaughtexceptionhandler *) detect if app crashes. that, have nsexception , want know class throws it.

also, not debugging purposes.

#pragma mark - exception handler void handleexception(nsexception *exception) {     // handle exception }  void installuncaughtexceptionhandler() {     nssetuncaughtexceptionhandler(&handleexception);      //signal(sigsys, sig_dfl);      for(int x = 1; x <= 30; x++)     {         signal(x, sig_dfl);         } } 

you can read stack trace +callstacksymbols (nsexception) inside exception handler. last entries system calls. beneath find thrower.

@try {     … } @catch (nsexception *e) {     nslog( @"%@", [e callstacksymbols] ); } 

Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -