[Boost-bugs] [Boost C++ Libraries] #7396: filesystem::path::remove_all(path, error_code) throws filesystem_error exception

Subject: [Boost-bugs] [Boost C++ Libraries] #7396: filesystem::path::remove_all(path, error_code) throws filesystem_error exception
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-09-19 22:55:50


#7396: filesystem::path::remove_all(path, error_code) throws filesystem_error
exception
----------------------------------------------------------+-----------------
 Reporter: Craig Dickson <cdickson@…> | Owner: bemandawes
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: filesystem
  Version: Boost 1.50.0 | Severity: Problem
 Keywords: |
----------------------------------------------------------+-----------------
 Several methods in filesystem::path, including remove_all, have an
 overload in which an extra error_code& argument is taken. According to the
 docs, this is supposed to cause failure (other than failure to allocate
 storage) to be reported in the error_code rather than as a thrown
 filesystem_error exception. However, remove_all can still throw
 filesystem_error exceptions because it uses a directory_iterator
 internally but makes no attempt to catch exceptions thrown by it. For
 example, if a subdirectory is deleted by another thread or process just
 before remove_all tries to list its contents, directory_iterator_construct
 will throw a filesystem_error that propagates up to remove_all's caller.

 As a side note, I think path and directory_iterator are both excessively
 exception-happy. It makes them painful to use.

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