Skip to content
Snippets Groups Projects
Commit aa933d6d authored by Xavier Robin's avatar Xavier Robin
Browse files

Throw an error if output file was not opened in SavePDB.

parent fd54b151
Branches
Tags
No related merge requests found
......@@ -397,6 +397,9 @@ PDBWriter::PDBWriter(const String& filename, const IOProfile& profile):
multi_model_(false), charmm_style_(profile.dialect=="CHARMM"),
is_pqr_(false), profile_(profile), filename_(filename)
{
if (!outfile_.is_open()) {
throw IOException("Failed to open: " + filename);
}
if (boost::iequals(".pqr", boost::filesystem::extension(filename))) {
is_pqr_=true;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment