Catch exceptions from boost::create_directories() to give useful error message.

This commit is contained in:
Atgeirr Flø Rasmussen 2012-04-23 11:10:55 +02:00
parent c0a5879d53
commit 1f9fea92fa

View File

@ -266,7 +266,12 @@ main(int argc, char** argv)
output_dir = param.getDefault("output_dir", std::string("output"));
// Ensure that output dir exists
boost::filesystem::path fpath(output_dir);
create_directories(fpath);
try {
create_directories(fpath);
}
catch (...) {
THROW("Creating directories failed: " << fpath);
}
output_interval = param.getDefault("output_interval", output_interval);
}
const int num_transport_substeps = param.getDefault("num_transport_substeps", 1);