Boost C++ Libraries: Ticket #6558: directory_iterator_increment fails to throw exception https://svn.boost.org/trac10/ticket/6558 <p> When trying to construct a directory_iterator from a location that doesn't exist anymore, no exception is thrown. </p> <p> This code in directory_iterator_increment fails: </p> <p> if (temp_ec) </p> <blockquote> <p> { </p> <blockquote> <p> it.m_imp.reset(); if (ec == 0) </p> <blockquote> <p> BOOST_FILESYSTEM_THROW( </p> <blockquote> <p> filesystem_error("boost::filesystem::directory_iterator::operator++", </p> <blockquote> <p> it.m_imp-&gt;dir_entry.path().parent_path(), error_code(BOOST_ERRNO, system_category()))); </p> </blockquote> </blockquote> </blockquote> <p> ec-&gt;assign(BOOST_ERRNO, system_category()); return; </p> </blockquote> <p> } </p> </blockquote> <p> it.m_imp is first reset and then used while trying to throw an exception. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/6558 Trac 1.4.3 Marshall Clow Tue, 14 Feb 2012 14:08:17 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/6558#comment:1 https://svn.boost.org/trac10/ticket/6558#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">duplicate</span> </li> </ul> <p> Duplicate of <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/6557" title="#6557: Bugs: directory_iterator_increment fails to throw exception (closed: fixed)">#6557</a> </p> Ticket