Boost Exception major refactoring: works with or without RTTI, vastly improved boost::throw_exception integration.

[SVN r48905]
This commit is contained in:
Emil Dotchevski
2008-09-19 20:29:26 +00:00
parent c9fcdf15b2
commit a9b5723d0d
73 changed files with 6532 additions and 5046 deletions

View File

@ -4,6 +4,7 @@
//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#include "helper1.hpp"
#include <boost/exception/get_error_info.hpp>
#include <boost/exception/info.hpp>
#include <boost/exception/diagnostic_information.hpp>
#include <boost/detail/lightweight_test.hpp>
@ -44,7 +45,26 @@ main()
catch(
std::exception & x )
{
BOOST_TEST( 42==*boost::get_error_info<test_int>(x) );
#ifdef BOOST_NO_RTTI
try
{
throw;
}
catch(
boost::exception & x )
{
#endif
BOOST_TEST( boost::get_error_info<test_int>(x) );
if( boost::shared_ptr<int const> p=boost::get_error_info<test_int>(x) )
BOOST_TEST( 42==*p );
#ifdef BOOST_NO_RTTI
}
catch(
... )
{
BOOST_TEST(false);
}
#endif
BOOST_TEST( std::string(x.what())==std::string("exception test length error") );
}
catch(