Merging recent changes from trunk.

[SVN r85636]
This commit is contained in:
Emil Dotchevski
2013-09-10 05:54:53 +00:00
parent a0d47fea34
commit 107f265ead
5 changed files with 23 additions and 8 deletions

View File

@ -1,10 +1,16 @@
//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. //Copyright (c) 2006-2013 Emil Dotchevski and Reverge Studios, Inc.
//Distributed under the Boost Software License, Version 1.0. (See accompanying //Distributed under the Boost Software License, Version 1.0. (See accompanying
//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) //file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef UUID_81522C0EB56511DFAB613DB0DFD72085 #ifndef UUID_81522C0EB56511DFAB613DB0DFD72085
#define UUID_81522C0EB56511DFAB613DB0DFD72085 #define UUID_81522C0EB56511DFAB613DB0DFD72085
#if (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
#pragma GCC system_header
#endif
#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
#pragma warning(push,1)
#endif
#ifdef BOOST_NO_EXCEPTIONS #ifdef BOOST_NO_EXCEPTIONS
# error This header requires exception handling to be enabled. # error This header requires exception handling to be enabled.
@ -44,4 +50,7 @@ boost
} }
} }
#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
#pragma warning(pop)
#endif
#endif #endif

View File

@ -21,6 +21,7 @@
#include <boost/exception/diagnostic_information.hpp> #include <boost/exception/diagnostic_information.hpp>
#include <boost/exception/detail/type_info.hpp> #include <boost/exception/detail/type_info.hpp>
#include <boost/exception/detail/clone_current_exception.hpp> #include <boost/exception/detail/clone_current_exception.hpp>
#include <boost/units/detail/utility.hpp>
#include <boost/shared_ptr.hpp> #include <boost/shared_ptr.hpp>
#include <stdexcept> #include <stdexcept>
#include <new> #include <new>
@ -89,7 +90,7 @@ boost
std::string std::string
to_string( original_exception_type const & x ) to_string( original_exception_type const & x )
{ {
return x.value()->name(); return units::detail::demangle(x.value()->name());
} }
#endif #endif

View File

@ -1,6 +1,6 @@
#ifndef UUID_AA15E74A856F11E08B8D93F24824019B #ifndef UUID_AA15E74A856F11E08B8D93F24824019B
#define UUID_AA15E74A856F11E08B8D93F24824019B #define UUID_AA15E74A856F11E08B8D93F24824019B
#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) #if (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
#pragma GCC system_header #pragma GCC system_header
#endif #endif
#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) #if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
@ -41,8 +41,11 @@
#if !defined( BOOST_EXCEPTION_DISABLE ) #if !defined( BOOST_EXCEPTION_DISABLE )
# include <boost/exception/exception.hpp> # include <boost/exception/exception.hpp>
#if !defined(BOOST_THROW_EXCEPTION_CURRENT_FUNCTION)
# include <boost/current_function.hpp> # include <boost/current_function.hpp>
# define BOOST_THROW_EXCEPTION(x) ::boost::exception_detail::throw_exception_(x,BOOST_CURRENT_FUNCTION,__FILE__,__LINE__) # define BOOST_THROW_EXCEPTION_CURRENT_FUNCTION BOOST_CURRENT_FUNCTION
#endif
# define BOOST_THROW_EXCEPTION(x) ::boost::exception_detail::throw_exception_(x,BOOST_THROW_EXCEPTION_CURRENT_FUNCTION,__FILE__,__LINE__)
#else #else
# define BOOST_THROW_EXCEPTION(x) ::boost::throw_exception(x) # define BOOST_THROW_EXCEPTION(x) ::boost::throw_exception(x)
#endif #endif

View File

@ -143,6 +143,8 @@ test_std_exception()
#ifndef BOOST_NO_RTTI #ifndef BOOST_NO_RTTI
std::type_info const * const * t=boost::get_error_info<boost::original_exception_type>(x); std::type_info const * const * t=boost::get_error_info<boost::original_exception_type>(x);
BOOST_TEST(t!=0 && *t!=0 && **t==typeid(T)); BOOST_TEST(t!=0 && *t!=0 && **t==typeid(T));
std::string s=diagnostic_information(x);
BOOST_TEST(!s.empty());
#endif #endif
} }
catch( catch(

View File

@ -35,8 +35,8 @@ boost_throw_exception_test()
catch( catch(
boost::exception & x ) boost::exception & x )
{ {
char const * const * file=boost::get_error_info<boost::throw_function>(x); char const * const * function=boost::get_error_info<boost::throw_function>(x);
char const * const * function=boost::get_error_info<boost::throw_file>(x); char const * const * file=boost::get_error_info<boost::throw_file>(x);
int const * line=boost::get_error_info<boost::throw_line>(x); int const * line=boost::get_error_info<boost::throw_line>(x);
BOOST_TEST( file && *file ); BOOST_TEST( file && *file );
BOOST_TEST( function && *function ); BOOST_TEST( function && *function );
@ -55,8 +55,8 @@ boost_throw_exception_test()
catch( catch(
boost::exception & x ) boost::exception & x )
{ {
char const * const * file=boost::get_error_info<boost::throw_function>(x); char const * const * function=boost::get_error_info<boost::throw_function>(x);
char const * const * function=boost::get_error_info<boost::throw_file>(x); char const * const * file=boost::get_error_info<boost::throw_file>(x);
int const * line=boost::get_error_info<boost::throw_line>(x); int const * line=boost::get_error_info<boost::throw_line>(x);
int const * data=boost::get_error_info<test_data>(x); int const * data=boost::get_error_info<test_data>(x);
BOOST_TEST( file && *file ); BOOST_TEST( file && *file );