[Boost-bugs] [Boost C++ Libraries] #9412: Error message hidden by assert

Subject: [Boost-bugs] [Boost C++ Libraries] #9412: Error message hidden by assert
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-11-19 23:39:25


#9412: Error message hidden by assert
------------------------------+---------------------------
 Reporter: anonymous | Owner: ramey
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: serialization
  Version: Boost 1.55.0 | Severity: Problem
 Keywords: |
------------------------------+---------------------------
 I received the following run-time error:

 Assertion failed: (__null != bpos), function save, file
 /opt/local/include/boost/archive/detail/oserializer.hpp, line 436.

 This is caused by the following lines:
 {{{
             // since true_type is valid, and this only gets made if the
             // pointer oserializer object has been created, this should
 never
             // fail
             const basic_pointer_oserializer * bpos
                 = static_cast<const basic_pointer_oserializer *>(
                     boost::serialization::singleton<
                         archive_serializer_map<Archive>
>::get_const_instance().find(*true_type)
                 );
             BOOST_ASSERT(NULL != bpos);
             if(NULL == bpos)
                 boost::serialization::throw_exception(
                     archive_exception(
                         archive_exception::unregistered_class,
                         "derived class not registered or exported"
                     )
                 );
 }}}

 Instead of the BOOST_ASSERT, I would have preferred to receive the
 respective error message.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/9412>
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:14 UTC