]> git.donarmstrong.com Git - mothur.git/blobdiff - degapseqscommand.cpp
added [ERROR] flag if command aborts
[mothur.git] / degapseqscommand.cpp
index 2514ae1a21bd491ffb924700b226b103ea2ca839..5df61889747833ef27f5929d227c849ea7245769 100644 (file)
@@ -25,8 +25,7 @@ vector<string> DegapSeqsCommand::getValidParameters(){
 //**********************************************************************************************************************
 DegapSeqsCommand::DegapSeqsCommand(){  
        try {
-               abort = true;
-               //initialize outputTypes
+               abort = true; calledHelp = true; 
                vector<string> tempOutNames;
                outputTypes["fasta"] = tempOutNames;
        }
@@ -61,10 +60,10 @@ vector<string> DegapSeqsCommand::getRequiredFiles(){
 //***************************************************************************************************************
 DegapSeqsCommand::DegapSeqsCommand(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
@@ -189,7 +188,7 @@ DegapSeqsCommand::~DegapSeqsCommand(){      /*      do nothing      */      }
 int DegapSeqsCommand::execute(){
        try{
                
-               if (abort == true) { return 0; }
+               if (abort == true) { if (calledHelp) { return 0; }  return 2;   }
                
                for (int s = 0; s < fastaFileNames.size(); s++) {