]> git.donarmstrong.com Git - mothur.git/blobdiff - getseqscommand.cpp
added [ERROR] flag if command aborts
[mothur.git] / getseqscommand.cpp
index 9f2b5060fcaa715f9a2fd3fc484ba585d6322da9..902cc07c2d6e8768e5aa9d1bacd3d9586e9196d9 100644 (file)
@@ -26,8 +26,7 @@ vector<string> GetSeqsCommand::getValidParameters(){
 //**********************************************************************************************************************
 GetSeqsCommand::GetSeqsCommand(){      
        try {
-               abort = true;
-               //initialize outputTypes
+               abort = true; calledHelp = true; 
                vector<string> tempOutNames;
                outputTypes["fasta"] = tempOutNames;
                outputTypes["taxonomy"] = tempOutNames;
@@ -69,10 +68,10 @@ vector<string> GetSeqsCommand::getRequiredFiles(){
 //**********************************************************************************************************************
 GetSeqsCommand::GetSeqsCommand(string option)  {
        try {
-               abort = false;
+               abort = false; calledHelp = false;   
                                
                //allow user to run help
-               if(option == "help") { help(); abort = true; }
+               if(option == "help") { help(); abort = true; calledHelp = true; }
                
                else {
                        //valid paramters for this command
@@ -257,7 +256,7 @@ void GetSeqsCommand::help(){
 int GetSeqsCommand::execute(){
        try {
                
-               if (abort == true) { return 0; }
+               if (abort == true) { if (calledHelp) { return 0; }  return 2;   }
                
                //get names you want to keep
                readAccnos();