[geos-devel] Making exceptions inherit from std::exception

Mark Coletti mcoletti at gmail.com
Thu Mar 10 16:22:34 EST 2005


On Thu, 10 Mar 2005 09:50:59 +0100, strk at refractions.net
<strk at refractions.net> wrote:
> Mark, thanks for the contribution. I've been thinking about this
> since the beginning, but changing it would mean another big break
> of the API :(.

Not really.  I only had to add the throw() qualifiers throughout the
Exception hierarchy; I already did that work for you.  You can use a
patch utility to apply my changes.

> We are probably going to break it anyway before next release so
> I'd apply it nonetheless. Note though, that the patch lacks modification
> of actual throws, as 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.)

Cheers!

Mark
-- 
I'm taking reality in small doses to build immunity.



More information about the geos-devel mailing list