RE: [libxml++] using throw() in function declaration



On Sat, 2003-07-12 at 12:00, Murray Cumming Comneon com wrote:
> Personally I've never really figured out a policy for this, but I'm sure
> there are some documents on the web about it. It would be nice to find out
> the consensus of C++ coders on this these days.

I have to admit that in my own code I rarely if ever specify exceptions
unless I know for sure that no other type of exception can be generated
inside a function. I chose to use it this time since when I was reading
the libxml++ code, I saw some exception specifications so I thought it
was the policy of the library.

As for a reference to a well-respected author's opinion on the subject,
I suggest looking at Scott Meyer's Item 14 from "More Effective C++",
called "Use exception specifications judiciously". If this isn't in your
collection, I can try to post the relevant parts to this discussion.

Cheers,

Eric





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]