]> git.donarmstrong.com Git - mothur.git/blobdiff - listseqscommand.cpp
added [ERROR] flag if command aborts
[mothur.git] / listseqscommand.cpp
index 1488cdadac766b243252e87053a0132975961884..360e1955bab31055c4ad06f71c933a4228058386 100644 (file)
@@ -26,8 +26,7 @@ vector<string> ListSeqsCommand::getValidParameters(){
 //**********************************************************************************************************************
 ListSeqsCommand::ListSeqsCommand(){    
        try {
-               abort = true;
-               //initialize outputTypes
+               abort = true; calledHelp = true; 
                vector<string> tempOutNames;
                outputTypes["accnos"] = tempOutNames;
        }
@@ -63,10 +62,10 @@ vector<string> ListSeqsCommand::getRequiredFiles(){
 
 ListSeqsCommand::ListSeqsCommand(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
@@ -206,7 +205,7 @@ void ListSeqsCommand::help(){
 int ListSeqsCommand::execute(){
        try {
                
-               if (abort == true) { return 0; }
+               if (abort == true) { if (calledHelp) { return 0; }  return 2;   }
                
                //read functions fill names vector
                if (fastafile != "")            {       inputFileName = fastafile;      readFasta();    }