Commit 76e9f05e authored by Mikaël Salson's avatar Mikaël Salson

Fasta: Delete istream before throwing exception.

When exception is thrown from constructor, the destructor is not called
parent 9eaab263
......@@ -94,6 +94,7 @@ OnlineFasta::OnlineFasta(const string &input,
extract_separator(extract_separator)
{
if (this->input->fail()) {
delete this->input;
throw invalid_argument("!! Error in opening file "+input);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment