iphone - CADisplayLink swallows exceptions -


i've noticed when using cadisplaylink, exceptions swallowed:

cadisplaylink *adisplaylink = [[uiscreen mainscreen] displaylinkwithtarget:self selector:@selector(doit)]; [adisplaylink setframeinterval:100]; [adisplaylink addtorunloop:[nsrunloop currentrunloop] formode:nsdefaultrunloopmode];  ...  - (void) doit {     nslog(@"before");      // force exception     nslog(@"%@", [[nsarray array] objectatindex:1]);      nslog(@"after"); } 

running code produces following output:

2011-04-11 18:30:36.001 testframelink[10534:207] before 2011-04-11 18:30:37.666 testframelink[10534:207] before 2011-04-11 18:30:39.333 testframelink[10534:207] before 

is correct behavior cadisplaylink? there way make abort program when exception bubbles rather unwind stack , pretend nothing happened?

i suspect coreanimation's c++ innards (as evidenced in backtraces) responsible exception-swallowing you've noticed (or rather, don't think nstimer swallows exceptions); coreanimation callbacks (called +[uiview setanimationdidfinishselector:] or -viewdidappear: when animated) seem same thing, except think printed log message. i'm not sure why apple's chosen exception-swallowing in preference exception handling; oh well.

the way you're asking is, far know,

@try {   ... } @catch(...) {   abort(); } 

not help, know. 2 other things might help:


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -