Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

7x Fix crash on save of Fireworks configuration when output file is not valid #5246

Merged
merged 1 commit into from Sep 16, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 5 additions & 3 deletions Fireworks/Core/src/FWConfigurationManager.cc
Expand Up @@ -108,8 +108,7 @@ FWConfigurationManager::writeToFile(const std::string& iName) const
{
std::ofstream file(iName.c_str());
if(not file) {
std::string message("unable to open file %s ", iName.c_str());
fflush(stdout);
std::string message = "unable to open file " + iName;
message += iName;
throw std::runtime_error(message.c_str());
}
Expand All @@ -120,7 +119,10 @@ FWConfigurationManager::writeToFile(const std::string& iName) const

streamTo(file, top, "top");
}
catch (std::runtime_error &e) { std::cout << e.what() << std::endl; }
catch (std::runtime_error &e)
{
fwLog(fwlog::kError) << "FWConfigurationManager::writeToFile() " << e.what() << std::endl;
}
}

void
Expand Down