Changes between Initial Version and Version 1 of Ticket #9796, comment 4


Ignore:
Timestamp:
Mar 21, 2014, 8:55:05 PM (9 years ago)
Author:
Emil Dotchevski

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #9796, comment 4

    initial v1  
    1 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.
     1From http://www.boost.org/doc/libs/release/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.
    22
    33(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.)