Skip to content
Snippets Groups Projects
Commit 16518e07 authored by Marco Biasini's avatar Marco Biasini
Browse files

better error message when trying to load ClustalW alignment from file that doesn't exist

parent a46234b7
No related branches found
No related tags found
No related merge requests found
......@@ -76,6 +76,10 @@ void ClustalIOHandler::Import(seq::SequenceList& aln,
typedef std::map<String, seq::SequenceHandle> SeqMap;
std::vector<seq::SequenceHandle> order;
SeqMap seq_map;
if (!instream) {
throw IOException("Can't import CLUSTAL alignment. Inexisting file "
"or invalid stream.");
}
if (!std::getline(instream, line) || line.find("CLUSTAL")!=0) {
throw IOException("bad CLUSTAL file. First line must contain CLUSTAL");
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment