|
Boost Users : |
From: Jeff F (TriumphSprint2000_at_[hidden])
Date: 2006-10-27 14:47:13
...
try
{
boost::filesystem::path tmp_dir ("tmp", boost::filesystem::native);
boost::filesystem::remove_all (tmp_dir);
std::string tmp_path (tmp_dir.string().c_str());
}
catch (boost::filesystem::filesystem_error & e)
{
std::cerr << "boost filesystem exception thrown!" << std::endl;
exit (1);
}
catch (...)
{
std::cerr << "Exception thrown!" << std::endl;
exit (1);
}
No exceptions thrown. The tmp_path constructor fails with an access violation where the pointer tmp_dir.m_path._Bx is a bad pointer. I would expect an exception from both the path constructor and the remove_all call, but they silently fail.
I can change the construction code to look like the following an it does not affect the situation in any way:
boost::filesystem::path env_path;
env_path /= "tmp";
Is this v1.33.0 or v1.33.1? Have you tried: catch ( const std::exception& e)?
What compiler? version? ...
Can you supply a complete minimal source code example that demonstrates the problem?
Jeff Flinn
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net