Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r59398 - in trunk/boost/exception: . detail
From: emil_at_[hidden]
Date: 2010-01-31 19:25:16


Author: emildotchevski
Date: 2010-01-31 19:25:15 EST (Sun, 31 Jan 2010)
New Revision: 59398
URL: http://svn.boost.org/trac/boost/changeset/59398

Log:
prettier diagnostic information, using <boost/units/detail/utility.hpp>
Text files modified:
   trunk/boost/exception/detail/error_info_impl.hpp | 6 +++---
   trunk/boost/exception/detail/type_info.hpp | 10 +++++++---
   trunk/boost/exception/diagnostic_information.hpp | 8 +++++---
   trunk/boost/exception/info.hpp | 4 ++--
   4 files changed, 17 insertions(+), 11 deletions(-)

Modified: trunk/boost/exception/detail/error_info_impl.hpp
==============================================================================
--- trunk/boost/exception/detail/error_info_impl.hpp (original)
+++ trunk/boost/exception/detail/error_info_impl.hpp 2010-01-31 19:25:15 EST (Sun, 31 Jan 2010)
@@ -1,4 +1,4 @@
-//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.
+//Copyright (c) 2006-2010 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)
@@ -25,7 +25,7 @@
             {
             public:
 
- virtual char const * tag_typeid_name() const = 0;
+ virtual std::string tag_typeid_name() const = 0;
             virtual std::string value_as_string() const = 0;
 
             protected:
@@ -62,7 +62,7 @@
 
         private:
 
- char const * tag_typeid_name() const;
+ std::string tag_typeid_name() const;
         std::string value_as_string() const;
 
         value_type value_;

Modified: trunk/boost/exception/detail/type_info.hpp
==============================================================================
--- trunk/boost/exception/detail/type_info.hpp (original)
+++ trunk/boost/exception/detail/type_info.hpp 2010-01-31 19:25:15 EST (Sun, 31 Jan 2010)
@@ -1,4 +1,4 @@
-//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.
+//Copyright (c) 2006-2010 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)
@@ -15,19 +15,23 @@
 #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
+#include <string>
 
 namespace
 boost
     {
     template <class T>
     inline
- char const *
+ std::string
     tag_type_name()
         {
 #ifdef BOOST_NO_TYPEID
         return BOOST_CURRENT_FUNCTION;
 #else
- return typeid(T*).name();
+ return units::detail::demangle(typeid(T*).name());
 #endif
         }
 

Modified: trunk/boost/exception/diagnostic_information.hpp
==============================================================================
--- trunk/boost/exception/diagnostic_information.hpp (original)
+++ trunk/boost/exception/diagnostic_information.hpp 2010-01-31 19:25:15 EST (Sun, 31 Jan 2010)
@@ -1,4 +1,4 @@
-//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.
+//Copyright (c) 2006-2010 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)
@@ -15,7 +15,9 @@
 #include <boost/config.hpp>
 #include <boost/exception/get_error_info.hpp>
 #include <boost/utility/enable_if.hpp>
-#include <boost/config.hpp>
+#ifndef BOOST_NO_RTTI
+#include <boost/units/detail/utility.hpp>
+#endif
 #include <exception>
 #include <sstream>
 #include <string>
@@ -135,7 +137,7 @@
                 }
 #ifndef BOOST_NO_RTTI
             tmp << std::string("Dynamic exception type: ") <<
- (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 )
                 tmp << "std::exception::what: " << wh << '\n';

Modified: trunk/boost/exception/info.hpp
==============================================================================
--- trunk/boost/exception/info.hpp (original)
+++ trunk/boost/exception/info.hpp 2010-01-31 19:25:15 EST (Sun, 31 Jan 2010)
@@ -1,4 +1,4 @@
-//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.
+//Copyright (c) 2006-2010 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)
@@ -47,7 +47,7 @@
 
     template <class Tag,class T>
     inline
- char const *
+ std::string
     error_info<Tag,T>::
     tag_typeid_name() const
         {


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk