Re: [Boost-bugs] [Boost C++ Libraries] #9796: std::system_error cannot be catched after is rethrown with boost::rethrow_exception()

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #9796: std::system_error cannot be catched after is rethrown with boost::rethrow_exception()
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-03-21 20:51:35


#9796: std::system_error cannot be catched after is rethrown with
boost::rethrow_exception()
-------------------------------+----------------------------
  Reporter: anonymous | Owner: emildotchevski
      Type: Bugs | Status: closed
 Milestone: To Be Determined | Component: exception
   Version: Boost 1.54.0 | Severity: Problem
Resolution: invalid | Keywords:
-------------------------------+----------------------------
Changes (by emildotchevski):

 * status: reopened => closed
 * resolution: => invalid

Comment:

 From
 http://www.boost.org/doc/libs/1_55_0/libs/exception/doc/current_exception.html:
 "Whenever current_exception fails to properly copy the current exception
 object, it returns an exception_ptr to an object of type that is as close
 as possible to the original exception type, using unknown_exception as a
 final fallback." This is to say that your code must be prepared to deal
 with boost::current_exception failing to give you an object of the exact
 type.

 (The std::logic_error exception is also not properly cloned which can lead
 to slicing. Similar support for std::system_error is more problematic
 because it isn't available in all implementations yet. Where it is
 available, in all likelihood std::current_exception is available as well,
 so just use that.)

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/9796#comment:4>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:15 UTC