Re: c++ exceptions
Re: c++ exceptions
- Subject: Re: c++ exceptions
- From: Kevin Van Vechten <email@hidden>
- Date: Tue, 16 Mar 2010 09:07:54 -0700
On Mar 16, 2010, at 8:37 AM, Joel Reymont wrote:
> On Mar 16, 2010, at 3:27 PM, Jens Alfke wrote:
>
>> The worst case is where your code calls a system framework that calls back into your code, and that bit of your code throws an exception that’s caught by your outer code. The system code in the middle gets unwound without being able to clean up, which can often cause really nasty problems later on.
>
> So how do you make sure this doesn't happen or code around it?
Simply don't do it. ;-) Avoid the use of exceptions within any callback functions you provide, or be sure to catch all possible exceptions within the callback before returning to prevent them from being thrown across the API boundary.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden