get_error_info returns raw pointer instead of shared_ptr (breaking change)

diagnostic_information can now be called with boost::exception or std::exception object.
BOOST_THROW_EXCEPTION can now be used even if exceptions are disabled.
added functions: current_exception_diagnostic_information, current_exception_cast
documentation updated to match.

[SVN r52225]
This commit is contained in:
Emil Dotchevski
2009-04-06 23:15:42 +00:00
parent b2e31a640e
commit 87384d2116
47 changed files with 7462 additions and 5870 deletions

View File

@ -35,9 +35,9 @@ boost_throw_exception_test()
catch(
boost::exception & x )
{
boost::shared_ptr<char const * const> file=boost::get_error_info<boost::throw_function>(x);
boost::shared_ptr<char const * const> function=boost::get_error_info<boost::throw_file>(x);
boost::shared_ptr<int const> line=boost::get_error_info<boost::throw_line>(x);
char const * const * file=boost::get_error_info<boost::throw_function>(x);
char const * const * function=boost::get_error_info<boost::throw_file>(x);
int const * line=boost::get_error_info<boost::throw_line>(x);
BOOST_TEST( file && *file );
BOOST_TEST( function && *function );
BOOST_TEST( line && *line==32 );
@ -55,10 +55,10 @@ boost_throw_exception_test()
catch(
boost::exception & x )
{
boost::shared_ptr<char const * const> file=boost::get_error_info<boost::throw_function>(x);
boost::shared_ptr<char const * const> function=boost::get_error_info<boost::throw_file>(x);
boost::shared_ptr<int const> line=boost::get_error_info<boost::throw_line>(x);
boost::shared_ptr<int const> data=boost::get_error_info<test_data>(x);
char const * const * file=boost::get_error_info<boost::throw_function>(x);
char const * const * function=boost::get_error_info<boost::throw_file>(x);
int const * line=boost::get_error_info<boost::throw_line>(x);
int const * data=boost::get_error_info<test_data>(x);
BOOST_TEST( file && *file );
BOOST_TEST( function && *function );
BOOST_TEST( line && *line==52 );
@ -117,7 +117,7 @@ tester()
{
#endif
BOOST_TEST(boost::get_error_info<test_data>(y));
if( boost::shared_ptr<int const> d=boost::get_error_info<test_data>(y) )
if( int const * d=boost::get_error_info<test_data>(y) )
BOOST_TEST(*d==42);
#ifdef BOOST_NO_RTTI
}