summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2014-10-19 20:22:58 (GMT)
committerTobias Markmann <tm@ayena.de>2014-10-20 13:49:33 (GMT)
commit6b22dfcf59474dd016a0355a3102a1dd3692d92c (patch)
tree2b1fd33be433a91e81fee84fdc2bf1b52575d934 /3rdParty/Boost/src/boost/exception/diagnostic_information.hpp
parent38b0cb785fea8eae5e48fae56440695fdfd10ee1 (diff)
downloadswift-6b22dfcf59474dd016a0355a3102a1dd3692d92c.zip
swift-6b22dfcf59474dd016a0355a3102a1dd3692d92c.tar.bz2
Update Boost in 3rdParty to version 1.56.0.
This updates Boost in our 3rdParty directory to version 1.56.0. Updated our update.sh script to stop on error. Changed error reporting in SwiftTools/CrashReporter.cpp to SWIFT_LOG due to missing include of <iostream> with newer Boost. Change-Id: I4b35c77de951333979a524097f35f5f83d325edc
Diffstat (limited to '3rdParty/Boost/src/boost/exception/diagnostic_information.hpp')
-rw-r--r--3rdParty/Boost/src/boost/exception/diagnostic_information.hpp35
1 files changed, 18 insertions, 17 deletions
diff --git a/3rdParty/Boost/src/boost/exception/diagnostic_information.hpp b/3rdParty/Boost/src/boost/exception/diagnostic_information.hpp
index ef89d73..7889c8f 100644
--- a/3rdParty/Boost/src/boost/exception/diagnostic_information.hpp
+++ b/3rdParty/Boost/src/boost/exception/diagnostic_information.hpp
@@ -5,7 +5,7 @@
#ifndef UUID_0552D49838DD11DD90146B8956D89593
#define UUID_0552D49838DD11DD90146B8956D89593
-#if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#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)
@@ -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>
@@ -31,17 +31,17 @@ boost
namespace
exception_detail
{
- std::string diagnostic_information_impl( boost::exception const *, std::exception const *, bool );
+ std::string diagnostic_information_impl( boost::exception const *, std::exception const *, bool, bool );
}
inline
std::string
- current_exception_diagnostic_information()
+ current_exception_diagnostic_information( bool verbose=true)
{
boost::exception const * be=current_exception_cast<boost::exception const>();
std::exception const * se=current_exception_cast<std::exception const>();
if( be || se )
- return exception_detail::diagnostic_information_impl(be,se,true);
+ return exception_detail::diagnostic_information_impl(be,se,true,verbose);
else
return "No diagnostic information available.";
}
@@ -107,7 +107,7 @@ boost
inline
std::string
- diagnostic_information_impl( boost::exception const * be, std::exception const * se, bool with_what )
+ diagnostic_information_impl( boost::exception const * be, std::exception const * se, bool with_what, bool verbose )
{
if( !be && !se )
return "Unknown exception.";
@@ -125,7 +125,7 @@ boost
return wh;
}
std::ostringstream tmp;
- if( be )
+ if( be && verbose )
{
char const * const * f=get_error_info<throw_file>(*be);
int const * l=get_error_info<throw_line>(*be);
@@ -149,36 +149,37 @@ boost
}
}
#ifndef BOOST_NO_RTTI
- tmp << std::string("Dynamic exception type: ") <<
- units::detail::demangle((be?(BOOST_EXCEPTION_DYNAMIC_TYPEID(*be)):(BOOST_EXCEPTION_DYNAMIC_TYPEID(*se))).type_->name()) << '\n';
+ 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';
#endif
- if( with_what && se )
+ if( with_what && se && verbose )
tmp << "std::exception::what: " << wh << '\n';
if( be )
if( char const * s=exception_detail::get_diagnostic_information(*be,tmp.str().c_str()) )
if( *s )
- return s;
+ return std::string(s);
return tmp.str();
}
}
template <class T>
std::string
- diagnostic_information( T const & e )
+ diagnostic_information( T const & e, bool verbose=true )
{
- return exception_detail::diagnostic_information_impl(exception_detail::get_boost_exception(&e),exception_detail::get_std_exception(&e),true);
+ return exception_detail::diagnostic_information_impl(exception_detail::get_boost_exception(&e),exception_detail::get_std_exception(&e),true,verbose);
}
inline
char const *
- diagnostic_information_what( exception const & e ) throw()
+ diagnostic_information_what( exception const & e, bool verbose=true ) throw()
{
char const * w=0;
#ifndef BOOST_NO_EXCEPTIONS
try
{
#endif
- (void) exception_detail::diagnostic_information_impl(&e,0,false);
+ (void) exception_detail::diagnostic_information_impl(&e,0,false,verbose);
if( char const * di=exception_detail::get_diagnostic_information(e,0) )
return di;
else