Boost logo

Boost :

Subject: Re: [boost] [exception] ostringstream like
From: joel falcou (joel.falcou_at_[hidden])
Date: 2010-08-16 08:08:48

On 16/08/10 14:01, fabien.castan_at_[hidden] wrote:
>> exception are just here to gather and carry diagnostic info, not full fledged error message
> If you throw a bad_alloc, you don't need to add a full fledged error message, I agree that the localization and the exception type is sufficient.
No, I mean that if you do advanced string manipulation in the exception
itself, you may screw up, adn cause a bad_alloc beign thrown and masking
your own exception.

> When you throw a logic_error, more the message is clear, precise and detailed better it is.
Just make your own, informative exception type deriving from logic_error.

Boost list run by bdawes at, gregod at, cpdaniel at, john at