From: Peter Dimov (pdimov_at_[hidden])
Date: 2001-10-19 05:54:38
From: "Kevlin Henney" <kevlin_at_[hidden]>
> My question is that as this fine-grained approach was not favoured
> before, should we now reconsider its use. In other words, should we
> embrace such an approach more generally, eg for numeric_cast as well?
And my anwer would be, _if_ the functions provide any means to distinguish
the error, the correct way to do that is via separate exception types.
I don't have an answer to the original question, "should we be able to
distinguish the different error conditions," but I'd point out that the
separate exception types approach is backward compatible, i.e. clients that
expect bad_lexical_cast would continue to function unchanged.
-- Peter Dimov Multi Media Ltd. PS: lexical cast to/from string? wstring? should I contribute a patch? :-)
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk