Changes between Initial Version and Version 1 of Ticket #9069


Ignore:
Timestamp:
Sep 10, 2013, 5:06:11 AM (9 years ago)
Author:
Emil Dotchevski
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #9069

    • Property Status newclosed
    • Property Resolutionfixed
  • Ticket #9069 – Description

    initial v1  
    1 Header: boost/exception/detail/exception_ptr.hpp
    2 
    3 Current definition of original_exception_type is
    4 {{{
    5 typedef error_info<struct tag_original_exception_type,std::type_info const *> original_exception_type;
    6 }}}
    7 
    8 It uses std::type_info to store original type.
    9 
    10 
    11 Current definition of to_string is
    12 {{{
    13     inline
    14     std::string
    15     to_string( original_exception_type const & x )
    16         {   
    17         return x.value()->name();
    18         }
    19 }}}
    20 
    21 to_string() returns std::type_info::name() without demangling, so user gets type name like "St13runtime_error". It would be better to get "std::runtime_error".
    22 
    23 I suggest using
    24 {{{
    25     inline
    26     std::string
    27     to_string( original_exception_type const & x )
    28         {   
    29         return units::detail::demangle(x.value()->name());
    30         }   
    31 }}}
    32 
    33 units::detail::demangle() is already used in boost::exception library, so no new dependency is introduced.
     1Trunk revision number 85634.