mirror of
https://github.com/boostorg/exception.git
synced 2025-07-12 20:16:34 +02:00
Compare commits
1 Commits
boost-1.55
...
boost-1.54
Author | SHA1 | Date | |
---|---|---|---|
b296669687 |
@ -1,16 +1,10 @@
|
||||
//Copyright (c) 2006-2013 Emil Dotchevski and Reverge Studios, Inc.
|
||||
//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.
|
||||
|
||||
//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)
|
||||
|
||||
#ifndef 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
|
||||
# error This header requires exception handling to be enabled.
|
||||
@ -50,7 +44,4 @@ boost
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
#endif
|
||||
|
@ -21,9 +21,6 @@
|
||||
#include <boost/exception/diagnostic_information.hpp>
|
||||
#include <boost/exception/detail/type_info.hpp>
|
||||
#include <boost/exception/detail/clone_current_exception.hpp>
|
||||
//#ifndef BOOST_NO_RTTI
|
||||
//#include <boost/units/detail/utility.hpp>
|
||||
//#endif
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <stdexcept>
|
||||
#include <new>
|
||||
@ -92,7 +89,7 @@ boost
|
||||
std::string
|
||||
to_string( original_exception_type const & x )
|
||||
{
|
||||
return /*units::detail::demangle*/(x.value()->name());
|
||||
return x.value()->name();
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -121,12 +118,10 @@ boost
|
||||
{
|
||||
Exception ba;
|
||||
exception_detail::clone_impl<Exception> c(ba);
|
||||
#ifndef BOOST_EXCEPTION_DISABLE
|
||||
c <<
|
||||
throw_function(BOOST_CURRENT_FUNCTION) <<
|
||||
throw_file(__FILE__) <<
|
||||
throw_line(__LINE__);
|
||||
#endif
|
||||
static exception_ptr ep(shared_ptr<exception_detail::clone_base const>(new exception_detail::clone_impl<Exception>(c)));
|
||||
return ep;
|
||||
}
|
||||
|
@ -15,9 +15,9 @@
|
||||
#include <boost/detail/sp_typeinfo.hpp>
|
||||
#include <boost/current_function.hpp>
|
||||
#include <boost/config.hpp>
|
||||
//#ifndef BOOST_NO_TYPEID
|
||||
//#include <boost/units/detail/utility.hpp>
|
||||
//#endif
|
||||
#ifndef BOOST_NO_TYPEID
|
||||
#include <boost/units/detail/utility.hpp>
|
||||
#endif
|
||||
#include <string>
|
||||
|
||||
namespace
|
||||
@ -31,7 +31,7 @@ boost
|
||||
#ifdef BOOST_NO_TYPEID
|
||||
return BOOST_CURRENT_FUNCTION;
|
||||
#else
|
||||
return /*units::detail::demangle*/(typeid(T*).name());
|
||||
return units::detail::demangle(typeid(T*).name());
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -43,7 +43,7 @@ boost
|
||||
#ifdef BOOST_NO_TYPEID
|
||||
return BOOST_CURRENT_FUNCTION;
|
||||
#else
|
||||
return /*units::detail::demangle*/(typeid(T).name());
|
||||
return units::detail::demangle(typeid(T).name());
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -16,9 +16,9 @@
|
||||
#include <boost/exception/get_error_info.hpp>
|
||||
#include <boost/exception/info.hpp>
|
||||
#include <boost/utility/enable_if.hpp>
|
||||
//#ifndef BOOST_NO_RTTI
|
||||
//#include <boost/units/detail/utility.hpp>
|
||||
//#endif
|
||||
#ifndef BOOST_NO_RTTI
|
||||
#include <boost/units/detail/utility.hpp>
|
||||
#endif
|
||||
#include <exception>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
@ -151,7 +151,7 @@ boost
|
||||
#ifndef BOOST_NO_RTTI
|
||||
if ( verbose )
|
||||
tmp << std::string("Dynamic exception type: ") <<
|
||||
/*units::detail::demangle*/((be?(BOOST_EXCEPTION_DYNAMIC_TYPEID(*be)):(BOOST_EXCEPTION_DYNAMIC_TYPEID(*se))).type_->name()) << '\n';
|
||||
units::detail::demangle((be?(BOOST_EXCEPTION_DYNAMIC_TYPEID(*be)):(BOOST_EXCEPTION_DYNAMIC_TYPEID(*se))).type_->name()) << '\n';
|
||||
#endif
|
||||
if( with_what && se && verbose )
|
||||
tmp << "std::exception::what: " << wh << '\n';
|
||||
|
@ -1,6 +1,6 @@
|
||||
#ifndef UUID_AA15E74A856F11E08B8D93F24824019B
|
||||
#define UUID_AA15E74A856F11E08B8D93F24824019B
|
||||
#if (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
||||
#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
||||
#pragma GCC system_header
|
||||
#endif
|
||||
#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
||||
@ -41,11 +41,8 @@
|
||||
|
||||
#if !defined( BOOST_EXCEPTION_DISABLE )
|
||||
# include <boost/exception/exception.hpp>
|
||||
#if !defined(BOOST_THROW_EXCEPTION_CURRENT_FUNCTION)
|
||||
# include <boost/current_function.hpp>
|
||||
# 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__)
|
||||
# define BOOST_THROW_EXCEPTION(x) ::boost::exception_detail::throw_exception_(x,BOOST_CURRENT_FUNCTION,__FILE__,__LINE__)
|
||||
#else
|
||||
# define BOOST_THROW_EXCEPTION(x) ::boost::throw_exception(x)
|
||||
#endif
|
||||
|
@ -143,8 +143,6 @@ test_std_exception()
|
||||
#ifndef BOOST_NO_RTTI
|
||||
std::type_info const * const * t=boost::get_error_info<boost::original_exception_type>(x);
|
||||
BOOST_TEST(t!=0 && *t!=0 && **t==typeid(T));
|
||||
std::string s=diagnostic_information(x);
|
||||
BOOST_TEST(!s.empty());
|
||||
#endif
|
||||
}
|
||||
catch(
|
||||
|
@ -35,8 +35,8 @@ boost_throw_exception_test()
|
||||
catch(
|
||||
boost::exception & x )
|
||||
{
|
||||
char const * const * function=boost::get_error_info<boost::throw_function>(x);
|
||||
char const * const * file=boost::get_error_info<boost::throw_file>(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 );
|
||||
@ -55,8 +55,8 @@ boost_throw_exception_test()
|
||||
catch(
|
||||
boost::exception & x )
|
||||
{
|
||||
char const * const * function=boost::get_error_info<boost::throw_function>(x);
|
||||
char const * const * file=boost::get_error_info<boost::throw_file>(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 );
|
||||
|
Reference in New Issue
Block a user