Re: c++ exceptions
Re: c++ exceptions
- Subject: Re: c++ exceptions
- From: David Leimbach <email@hidden>
- Date: Tue, 6 Apr 2010 14:07:38 -0700
On Mon, Apr 5, 2010 at 4:31 PM, Uli Kusterer
<email@hidden> wrote:
On 16.03.2010, at 19:40, Jens Alfke wrote:
> Ideally C++ would have the same kind of exception-checking that Java does, so you could declare a function as not throwing any exception and have the compiler enforce that for you. But C++ doesn't work that way. So you just have to be careful to wrap all your entry points, including callbacks, in try/catch blocks.
C++ supports throw specifiers, too, for both functions and methods. It's just that the defaults are different: If you don't specify a throw specifier, it will let you throw *any* exception.
C++ doesn't really work that way. The exception specifications for C++ have ended up being specified in a way that make them almost pointless.
Dave
-- Uli Kusterer
"The Witnesses of TeachText are everywhere..."
http://www.masters-of-the-void.com
_______________________________________________
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
_______________________________________________
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