]> git.donarmstrong.com Git - mothur.git/blobdiff - removegroupscommand.cpp
added [ERROR] flag if command aborts
[mothur.git] / removegroupscommand.cpp
index 2c98e814220432e2d27cf82499235a3fe3e928bb..4462b52863f235cb8436d0db77fe5a3698823534 100644 (file)
@@ -27,8 +27,7 @@ vector<string> RemoveGroupsCommand::getValidParameters(){
 //**********************************************************************************************************************
 RemoveGroupsCommand::RemoveGroupsCommand(){    
        try {
-               abort = true;
-               //initialize outputTypes
+               abort = true; calledHelp = true; 
                vector<string> tempOutNames;
                outputTypes["fasta"] = tempOutNames;
                outputTypes["taxonomy"] = tempOutNames;
@@ -67,10 +66,10 @@ vector<string> RemoveGroupsCommand::getRequiredFiles(){
 //**********************************************************************************************************************
 RemoveGroupsCommand::RemoveGroupsCommand(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
@@ -222,7 +221,7 @@ void RemoveGroupsCommand::help(){
 int RemoveGroupsCommand::execute(){
        try {
                
-               if (abort == true) { return 0; }
+               if (abort == true) { if (calledHelp) { return 0; }  return 2;   }
                
                groupMap = new GroupMap(groupfile);
                groupMap->readMap();