On Mon, Jul 2, 2012 at 3:13 AM, Szymon Gatner
<szymon.gatner@gmail.com> wrote:
I am trying to pass Poco::Exeption from worker thread to a client
thread/future. Idea is simple:
try
{
operationThatMyThrowPocoException();
}
catch (const Poco::Exception& e)
{
// rethrow with exception_ptr support so can be passed between threads
BOOST_THROW_EXCEPTION(e);
}
You understand that the above code will erase the type of the exception object in case what got thrown initially is of type that derives from Poco::Exception, right?
Is there a way to use BOOST_THROW_EXCEPTION /
enable_current_exception() with existing exception hierarchies that
define clone() already?
Probably not. If your exceptions can already be cloned, you can clone them that way.