Boost logo

Boost :

Subject: Re: [boost] Generic try, catch in boost::lexical_cast
From: Vicente Botet (vicente.botet_at_[hidden])
Date: 2011-05-19 17:18:05

Antony Polukhin wrote:
> 2011/5/19 Jeroen Habraken <vexocide_at_[hidden]>:
>> Hi,
>> Whilst updating SVN today I spotted a change to boost::lexical_cast,
>>, which introduces a
>> try { } catch(...) { } construction. I'm curious as to why this
>> catch-all is needed since it seems to be there to deal with
>> boost::numeric_cast exceptions and whether it could lead to a
>> std::bad_alloc being rethrown as a bad_lexical_cast.
> numeric_cast does not use new operator, so std::bad_alloc will not be
> rethrown as a bad_lexical_cast. But you are right, and it will be more
> appropriate to catch only boost::numeric_cast exceptions. I`ll fix it
> in next commit. Great thanks for reporting this.


I see new test have been added. Have you run the new tests with the previous
lexical cast version?


View this message in context:
Sent from the Boost - Dev mailing list archive at

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