On Tue, Apr 04, 2006 at 06:59:20PM +0200, Mateusz Å?oskot wrote: > [EMAIL PROTECTED] wrote: > > On Tue, Apr 04, 2006 at 04:44:31PM +0200, Mateusz à ?oskot wrote: > > > >> Honestly, I don't think al GEOS exceptions can be categorized as > >> runtime_exception, some are logical e.g. IllegalArgumentException. > >> GEOSException is a general geos exception and I think it should be > >> derived directly from std::exception. GEOSException could be > >> defined similarly as those exceptions in <stdexcept> file. > >> > >> What do you think? > > > > That's fine with me. Anyway, I think this was previous layout. > > Yes, indeed. > But there were no what() accessor, so that's why the problem occured. > > > Maybe the problem was GEOSException didn't define what() as a 'const' > > method (thus NOT overriding the non-const version) ? > > Yes, I think so. > I've just tested it again and here is my final proposal: > > 1. GEOSException derives from std::exception > 2. GEOSException has it's own member to store the message, > similarly to standard exception classes derived from std::exception > 3. GEOSException overrides virtual member declared in > std::exception::what() to return the message stored in the local buffer > > Does it make sense?
I committed a patch in this direction. Could you test current CVS with your existing tests please ? --strk; _______________________________________________ geos-devel mailing list geos-devel@geos.refractions.net http://geos.refractions.net/mailman/listinfo/geos-devel