• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
raising NSException between Controllers
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: raising NSException between Controllers
      • From: Tony Romano <email@hidden>
    • Re: raising NSException between Controllers
      • From: Graham Cox <email@hidden>
  • Prev by Date: Re: NSDatepicker inside a TableViewColumn
  • Next by Date: merging NSWindow and NSView controllers
  • Previous by thread: [iPhone] Detect touches on MKMapView
  • Next by thread: Re: raising NSException between Controllers
  • Index(es):
    • Date
    • Thread