Boost logo

Boost :

From: Bronek Kozicki (Brok_at_[hidden])
Date: 2003-10-30 08:47:47


Wynand Winterbach <wynand_at_[hidden]> wrote:

> I agree that the exception reason must be codified into the type name.
> It is a bit of work to code like this, but I for one find it a lot
> easier
> to understand the code (provided that proper names are given to
> exceptions).

why don't we just make *small* hierarchy of exceptions, all derived from
"socket_error" derived from "std::runtime_error" ? I hope that main LWG
objection was agains large number of exception classes, and I feel that
20 might be bit too many. Here "too many" means : it might be difficult
to define (and use correctly) them, assuming each exception class has
different meaning.

Another point: currently C++ standard defines only small set of
exception. I can perfectly understand Committee objections against
extending this hierarchy with many exception classes, specific to few
problem domains. Maybe defining namespaces (specifit to these domains)
inside std namespace, or defining exception classes inside other (domain
specific) classes could dismiss *some* objections (while rising others),
that's just my blind guess.

B.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk