]> git.donarmstrong.com Git - mothur.git/blobdiff - removerarecommand.cpp
added [ERROR] flag if command aborts
[mothur.git] / removerarecommand.cpp
index 0ba90f38eac435c09ca922a5cffaf7943da500ad..0c656a053a7293f4ef7fa3325edead27339c9196 100644 (file)
@@ -28,8 +28,7 @@ vector<string> RemoveRareCommand::getValidParameters(){
 //**********************************************************************************************************************
 RemoveRareCommand::RemoveRareCommand(){        
        try {
-               abort = true;
-               //initialize outputTypes
+               abort = true; calledHelp = true; 
                vector<string> tempOutNames;
                outputTypes["rabund"] = tempOutNames;
                outputTypes["sabund"] = tempOutNames;
@@ -69,11 +68,11 @@ vector<string> RemoveRareCommand::getRequiredFiles(){
 RemoveRareCommand::RemoveRareCommand(string option)  {
        try {
                globaldata = GlobalData::getInstance();
-               abort = false;
+               abort = false; calledHelp = false;   
                allLines = 1;
                
                //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
@@ -227,7 +226,7 @@ void RemoveRareCommand::help(){
 int RemoveRareCommand::execute(){
        try {
                
-               if (abort == true) { return 0; }
+               if (abort == true) { if (calledHelp) { return 0; }  return 2;   }
                
                if (m->control_pressed) { return 0; }