[Boost-bugs] [Boost C++ Libraries] #6363: Incorrect error documentation for time_zone_from_region() in tz_db_base.hpp

Subject: [Boost-bugs] [Boost C++ Libraries] #6363: Incorrect error documentation for time_zone_from_region() in tz_db_base.hpp
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-01-07 00:50:48


#6363: Incorrect error documentation for time_zone_from_region() in tz_db_base.hpp
------------------------------+---------------------------------------------
 Reporter: nickbp@… | Owner: az_sw_dude
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: date_time
  Version: Boost 1.48.0 | Severity: Problem
 Keywords: |
------------------------------+---------------------------------------------
 In the event of an error, time_zone_from_region()'s documentation is
 incorrect in the following ways:

 - The function returns a null pointer. It does not throw an exception.
 - The specified "record_not_found" exception does not exist.

 Here's the doc/code in question (identical in at least 1.46.0-1.48.0):

 {{{
       //! Returns a time_zone object built from the specs for the given
 region
       /*! Returns a time_zone object built from the specs for the given
        * region. If region does not exist a local_time::record_not_found
        * exception will be thrown */
       boost::shared_ptr<time_zone_base_type>
       time_zone_from_region(const string_type& region) const
       {
         // get the record
         typename map_type::const_iterator record =
 m_zone_map.find(region);
         if(record == m_zone_map.end()){
           return boost::shared_ptr<time_zone_base_type>(); //null pointer
         }
         return record->second;
       }
 }}}

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