Subject: [ggl] Definition of exception types
From: Barend Gehrels (Barend.Gehrels)
Date: 2009-06-14 03:38:39
> I'd like to collect some thoughts and guidelines about exception types
> defined in GGL.
> Do we stick to Boost guidelines  ?
> Should we have abstract ggl::exception defined as std::exception
> subclass and derive all other exceptions from it?
I just added it on Friday. Just committed it. So yes, good idea.
> I'd suggest to prefer to std:: naming with _error postfix, for instance
> ggl::wkb::value_error, than what I have now:
> and others.
OK for me, but what is the reason to prefer _error above _exception?
> Among others, there seems to be two structures popular:
> 1. All GGL exceptions live directly in ggl:: and are defined in single
> file, for instance:
> 2. Exceptions are categorized using namespace
> Which to prefer?
I prefer to have exceptions close to which module they belong, so not in
a single file. This makes modularization more easy. Or is there another
reason to have everything in a single file?
The namespaces look OK to me, but it can grow and is subject to
discussion, because you can follow the folder structure or the
namespaces to which a module belong...
>  http://www.boost.org/community/error_handling.html
Geometry list run by mateusz at loskot.net