Boost C++ Libraries: Ticket #7396: filesystem::path::remove_all(path, error_code) throws filesystem_error exception https://svn.boost.org/trac10/ticket/7396 <p> Several methods in filesystem::path, including remove_all, have an overload in which an extra error_code&amp; 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. </p> <p> As a side note, I think path and directory_iterator are both excessively exception-happy. It makes them painful to use. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7396 Trac 1.4.3