[geos-devel] Making exceptions inherit from std::exception
Mark Coletti
mcoletti at gmail.com
Fri Mar 11 13:25:14 EST 2005
On Fri, 11 Mar 2005 08:04:16 +0100, strk at refractions.net
<strk at refractions.net> wrote:
> On Thu, Mar 10, 2005 at 04:22:34PM -0500, Mark Coletti wrote:
[...]
> Sorry, I only read your mail, not your patch. Now I see...
No worries. Doing what I can to make things easier! :)
> > > [...] all GEOSexceptions (the Base class) are thrown by
> > > pointer, not by reference, as the std::exception are.
> > Is there a reason to throw exceptions in this way? Didn't Scott
> > Meyers have something to say about that in _Effective C++_? (Sorry,
> > don't have my copy handy here at work.)
> I don't know who Scott Meyers is, anyway I understand myself that
> throwing by pointer has been a *wrong* decision. I didn't take it,
> and taking it now would be problematic for current users.
OOo, Scott Meyers' "Effective" works are a must read for all C++
programmers. Here's a link to his site that lists his books:
http://www.aristeia.com/books_frames.html
Actually, it looks like he's consolidated _Effective C++_ and _More
Effective C++_ into a single CD, and included some additional
material. (_Effective STL_ isn't included; it's a good book, too, so
I recommend it as well.) Link here:
http://www.awprofessional.com/title/0201310155
Essentially these books are good enough to warrant regular re-reading
-- in fact, I'm long overdue for skimming back over these books. (I'm
going to order the CD version now so that I can more efficiently
review these books.)
Here's a hint: when reading these books be sure to skim the index for
some humorous surprises Scott embedded there.
Cheers!
Mark
--
I'm taking reality in small doses to build immunity.
More information about the geos-devel
mailing list