Boost logo

Boost Users :

From: Jonathan Turkanis (technews_at_[hidden])
Date: 2004-08-23 16:02:33


"Jeff Holle" <jeff.holle_at_[hidden]> wrote in message
news:412A4CE7.4000202_at_verizon.net...
> My two cents of the referenced html page.
>
> Not placing attributes like string into an exception class only
makes
> sense if the exception being thrown has
> something to do with a memory starvation situation.

If you run out of memory when you're trying to throw a non-memory
related exception, you loose some information which might be helpful
some of the time. So I'd say not embedding strings is a good rule of
thumb. If you can't easily avoid it, don't worry, otherwise don't do
it.

> For a lot of exception types that I can think of this is not the
case.
>
> As an example of this std::runtime_error often has a string
attribute
> and this is perfectly fine.
>

Sure. The standard library doesn't follow the boost guidelines.

Jonathan


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net