]> git.donarmstrong.com Git - mothur.git/blobdiff - amovacommand.cpp
added [ERROR] flag if command aborts
[mothur.git] / amovacommand.cpp
index c0b9aec10e4f8695f040e61e80910a8efeb310af..0a9b53b8af07ea837553355328aa6d00230c29f8 100644 (file)
@@ -66,8 +66,7 @@ vector<string> AmovaCommand::getValidParameters(){
 //**********************************************************************************************************************
 AmovaCommand::AmovaCommand(){  
        try {
-               abort = true;
-               //initialize outputTypes
+               abort = true; calledHelp = true; 
                vector<string> tempOutNames;
                outputTypes["amova"] = tempOutNames;
        }
@@ -105,12 +104,12 @@ vector<string> AmovaCommand::getRequiredFiles(){
 AmovaCommand::AmovaCommand(string option) {
        try {
                globaldata = GlobalData::getInstance();
-               abort = false;
+               abort = false; calledHelp = false;   
                allLines = 1;
                labels.clear();
                
                //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
@@ -349,7 +348,7 @@ AmovaCommand::~AmovaCommand(){}
 int AmovaCommand::execute(){
        try {
                
-               if (abort == true) { return 0; }
+               if (abort == true) { if (calledHelp) { return 0; }  return 2;   }
                
                //read design file
                designMap = new GroupMap(designfile);