Boost logo

Boost :

From: Marshall Clow (marshall_at_[hidden])
Date: 2003-10-31 21:33:14


At 3:54 PM -0500 10/30/03, Beman Dawes wrote:
>At 09:00 AM 10/30/2003, Peter Dimov wrote:
>
>>Bronek Kozicki wrote:
>>> Wynand Winterbach <wynand_at_[hidden]> wrote:
>>>
>>> why don't we just make *small* hierarchy of exceptions, all derived
>>> from "socket_error" derived from "std::runtime_error" ?
>>
>>What does the user gain from this?
>
>Users who care about the exact reason can catch the more detailed
>types, uses who just care that the exception is sockets related can
>catch socket_error?

I've been using Nitrogen <http://sourceforge.net/projects/nitric/>
lately, which has
a large exception hierarchy (mapping MacOS error numbers --> classes), and
it seems to work quite well.

You can either (a) catch the base class and recover the error from that, or
(b) catch individual errors seperately.

-- 
-- Marshall
Marshall Clow     Idio Software   <mailto:marshall_at_[hidden]>
Hey! Who messed with my anti-paranoia shot?

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