• 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
Re: Objective-C exception handler blocks skipped
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Objective-C exception handler blocks skipped


  • Subject: Re: Objective-C exception handler blocks skipped
  • From: Syd Polk <email@hidden>
  • Date: Mon, 22 Jan 2007 23:50:32 -0600


On Jan 22, 2007, at 11:23 PM, email@hidden wrote:

I wanted to ask the Xcode community and Apple about an issue I'm seeing with some Objective C++ code. I have a C++ template class in whose methods calls Objective-C code. Specifically, there are Objective-C exception handler blocks (@try/@catch). However, when the C++ method is called, the part inside the Objective-C exception handler is not executed. It's totally skipped. If I remove the @try/@catch block, the code compiles and executes fine.

So, I wanted to see if anyone knows why this is happening. I do notice in the debugger that gdb thinks the default language isn't correct for the current stack frame when it gets to my C++ class with the Objective-C++ code. I don't know why it would think this because I compiled everything with the Obj-C++ compiler.

HELP!! This is really killing our project right now!


Any time you have exceptions crossing the C++/Objective C layer in Objective C++, you have to catch them at the layer and rethrow them in the other language. So, the C++ calls in your Objective C++ classes have to have C++ catch blocks, which will then rethrow Objective C style, and vice versa. The exception models are not unified.


Thanks for any info.

Doug Hill
Oracle Corp
email@hidden

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40mac.com


This email sent to email@hidden

Syd Polk email@hidden "Let the music be your light" - Dave Edwards, KUHF-FM, 1982


_______________________________________________ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Objective-C exception handler blocks skipped (From: email@hidden)

  • Prev by Date: Objective-C exception handler blocks skipped
  • Next by Date: "Compile" command and universal binaries
  • Previous by thread: Objective-C exception handler blocks skipped
  • Next by thread: Re: Objective-C exception handler blocks skipped
  • Index(es):
    • Date
    • Thread