I am trying to use Boost exceptions for the additional metadata that I can attach to exceptions as they bubble up the call stack. But one use case I have encountered but do not know how to handle is: how do I catch a std::exception and wrap that with a boost exception and throw/rethrow the wrapped exception? For example:
try {
CallFunctionThatThrowsStdException();
} catch(std::exception& ex) {
MyBoostException bex{ex};
bex << "Add metadata for this call scenario";
throw bex;
}
What is a good open source project that uses Boost.Exception to study?
Thanks!