Test (and fix) error info with virtual inheritance from boost::exception

This commit is contained in:
Peter Dimov
2019-11-30 21:51:32 +02:00
parent c58f418c2f
commit a2a78f6e46
2 changed files with 49 additions and 0 deletions

View File

@ -117,10 +117,13 @@ public:
explicit wrapexcept( E const & e ): E( e )
{
boost::exception_detail::copy_boost_exception( this, &e );
}
explicit wrapexcept( E const & e, boost::source_location const & loc ): E( e )
{
boost::exception_detail::copy_boost_exception( this, &e );
set_info( *this, throw_file( loc.file_name() ) );
set_info( *this, throw_line( loc.line() ) );
set_info( *this, throw_function( loc.function_name() ) );