the fasta error message should include the filename
authorDiane Trout <diane@caltech.edu>
Thu, 13 Apr 2006 20:04:02 +0000 (20:04 +0000)
committerDiane Trout <diane@caltech.edu>
Thu, 13 Apr 2006 20:04:02 +0000 (20:04 +0000)
alg/sequence.cpp

index 9df5fd511efbdf24b3ef01cc9d91939ad27c5ef8..b15c4f5fc946ccecc13064f962ded0c2b32ca708 100644 (file)
@@ -28,6 +28,7 @@
 
 #include <string>
 #include <iostream>
+#include <sstream>
 
 namespace fs = boost::filesystem;
 using namespace std;
@@ -157,7 +158,10 @@ Sequence::load_fasta(fs::path file_path, int seq_num,
       // sequence filtering for upcasing agctn and convert non AGCTN to N
       set_filtered_sequence(sequence_raw, start_index, end_index-start_index);
     } else {
-      throw mussa_load_error("%s did not have a fasta header");
+      stringstream errormsg;
+      errormsg << file_path.native_file_string()
+               << " did not have any fasta sequences" << endl;
+      throw mussa_load_error(errormsg.str());
     }
     data_file.close();
   }