Boost logo

Boost :

From: Scott Woods (scottw_at_[hidden])
Date: 2003-10-30 17:20:15


----- Original Message -----
From: "Peter Dimov" <pdimov_at_[hidden]>
To: "Boost mailing list" <boost_at_[hidden]>
Sent: Friday, October 31, 2003 9:08 AM
Subject: Re: [boost] Re: Re: Re: Sockets!

> Jessie Hernandez wrote:
> [...]
> > The above hierarchy, I think, is the best of both worlds: you have a
> > minimal number of exception classes covering broad types of errors.
>
> But _why_ is having a minimal number of exception classes a virtue?
> _______________________________________________

My $0.02

If there is a general acknowledgement that exception-hierarchies
and exception-classes-returning-codes are two valid error-propagation
techniques then;

* maybe the "perfect balance" for the use of both is something decided
by the author of each piece of software (subject to reviews of course).
* exception-hierarchies cannot be "passed on". with classes-returning-
codes it is pretty trivial to detect an exception and then pass codes
to other methods/functions. doing something equivalent from inside
a catch() {} is not the same. for this reason I do minimize the number
of exception classes. but maybe laziness is not a valid influence on
the balance of "exception-hierarchies and exception-classes-returning-codes"

:-)

cheers,
Scott


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