Subject: Re: [boost] Boost and exceptions
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2012-06-23 05:44:58
On 06/22/2012 10:17 PM, Robert Ramey wrote:
> Why does the serialization library have to include code from boost
> exception in order to do this?
> You can use boost exception at the same place, catch
> the standard exception that the serialization throws, construct you're
> own boost exception and continue on.
So you're suggesting that people should reimplement the whole API of
Boost.Serialization where each function call is wrapped in a try/catch
with all the expected Boost.Serialization exception types?
Sounds practical. How about Boost.Serialization directly uses a global
togglable mechanism which can be set to use the feature or not instead?
> see that it would be of any use. here's typical serialization code:
Typical example code is irrelevant. In real life people build complex
systems where several things can happen in different threads and you
need to be able to transfer errors from one thread to the other. You
also write generic code where you cannot predict in advance what the
exact type of the exception you're gonna have is going to be.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk