diff --git a/examples/polymer_reorder.cpp b/examples/polymer_reorder.cpp index eb5358470..ac6593c82 100644 --- a/examples/polymer_reorder.cpp +++ b/examples/polymer_reorder.cpp @@ -307,7 +307,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);