Subject: [Boost-bugs] [Boost C++ Libraries] #12518: boost::filesystem::unique_path throws std::exception and not filesystem_error
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-10-11 12:09:54
#12518: boost::filesystem::unique_path throws std::exception and not
filesystem_error
-----------------------------+------------------------------
Reporter: gerald.lodron@⦠| Type: Bugs
Status: new | Milestone: To Be Determined
Component: None | Version: Boost 1.58.0
Severity: Problem | Keywords:
-----------------------------+------------------------------
try this
path tmp = boost::filesystem::temp_directory_path();
tmp /= "MyApp-%%%%-%%%%-%%%%-%%%%";
path folderName;
try
{
folderName= boost::filesystem::unique_path(tmp );
}
catch(boost::filesystem::filesystem_error& roE)
{
std::cout << "Never come here on windows temporary user account" <<
std::endl;
}
catch (std::exception& roE)
{
std::cout << "Here i come on windows temporary user account" <<
std::endl;
}
in fact a boost exception should be thrown. Tested on Windows 8.1 x64
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/12518> 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:20 UTC