Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Mac > Mac Programmer Tools > exception handl...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 2 Topic 566 of 637
Post > Topic >>

exception handling problem in xcode

by gauravbjain@[EMAIL PROTECTED] Dec 9, 2006 at 06:24 AM

Hi,

I am facing a problem with exception handling code in Xcode. I have
code like following:


typedef short EXCPTN;
void my_func()
{

	try
	{

		A(); // Inside this function a exception of type EXCPTN is thrown;
	}
	catch( EXCPTN ex)
	{
		//handling code here, doesn't get hit.
	}
	catch(...)
	{
		//handling code here. doesn't get hit.
	}
}


As soon as the exception is thrown inside method A(), the application
gets terminated. Essentially it doesn't come to the handler which I
have written here. The same piece of code works fine using Visual
Studio 2005. I am building it with -fexceptions compiler option. I
tried to remove -fvisibility=hidden, which is on by default, even that
did not help.

The Xcode version: 2.3, using GCC: 4.0.

Has anyone faced this problem or have some idea about what to do here?

Thanks.
GJ
 




 2 Posts in Topic:
exception handling problem in xcode
gauravbjain@[EMAIL PROTEC  2006-12-09 06:24:04 
Re: exception handling problem in xcode
David Phillip Oster <o  2006-12-09 19:41:39 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Nov 22 9:59:11 CST 2008.