forked from boostorg/exception
copy_exception/make_exception_ptr implemented via wrapexcept rather than throw/catch
This commit is contained in:
@ -76,20 +76,13 @@ boost
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class T>
|
template <class E>
|
||||||
inline
|
inline
|
||||||
exception_ptr
|
exception_ptr
|
||||||
copy_exception( T const & e )
|
copy_exception( E const & e )
|
||||||
{
|
{
|
||||||
try
|
wrapexcept<E> * w = new wrapexcept<E>(e);
|
||||||
{
|
return exception_ptr(shared_ptr<wrapexcept<E> >(w));
|
||||||
throw enable_current_exception(e);
|
|
||||||
}
|
|
||||||
catch(
|
|
||||||
... )
|
|
||||||
{
|
|
||||||
return current_exception();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
|
Reference in New Issue
Block a user