Subject: [boost] [lexical_cast] lexical_cast does not throw bad_lexical_cast
From: Carlos Rafael Giani (e0325834_at_[hidden])
Date: 2009-09-15 11:41:16
I've noticed that sometimes lexical_cast does not throw
bad_lexical_cast. Instead, it throws
>'. A catch clause expecting a bad_lexical_cast fails here.
What seems confusing to me is that the lexical_cast docs do mention
"catch (bad_lexical_cast &)" as correct code
The solution that worked for me was to catch boost::exception instead.
Am I missing something here? I consulted the documentation, but still
have no answer. It also seems that I am not alone with this problem;
at least indicate this for me.
Carlos Rafael Giani