raising NSException between Controllers
raising NSException between Controllers
- Subject: raising NSException between Controllers
- From: John Love <email@hidden>
- Date: Sat, 19 Jun 2010 18:35:49 -0400
I am having inconsistent problems when I call from Controller #1 one of 1's methods which looks like:
- (void ) exitBgCalculationThread:(int)withStatus {
[controller2 haltBgCalculationThread:withStatus];
}
Controller #2's haltBgCalculationThread:withStatus eventually calls:
itsException = [NSException exceptionWithName:newErrorName
reason:newErrorReason
userInfo:nil];
[itsException raise]; // stops here and long jumps to try-catch-finally Handler
// within EC's -calculateWorksheetRow:
The call to -raise enters the @catch block of a try-catch-finally Handler within Controller #2 (the only such Handler anywhere). The only statement within this @catch block is a call to NSLog. After this, the NSLog call falls thru to the @finally portion which returns the correct error code. Controller #2's calculation for loop immediately exits and through a call-back routine sends a message back to Controller #1 which displays the appropriate error message in the active window.
The correct error message is displayed; however, in seemingly random instances, the above NSLog is never seen.
Whenever, I call Controller #2's -haltBgCalculationThread: from Controller #2, everything works dandy; the lack of calling NSLog in random instances occurs only when I call Controller #2's -haltBgCalculationThread: from Controller #1.
Maybe?? it is because I am bouncing between separate Controllers and am causing mayhem.
Any psychic premonitions would be welcomed.
John Love
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden