]> git.donarmstrong.com Git - mothur.git/blobdiff - getlineagecommand.cpp
added [ERROR] flag if command aborts
[mothur.git] / getlineagecommand.cpp
index 8a6f47c0998202943e398fce09a9ae52edfa5eda..eee0ccad08a84f448ea47a42213673b0dd05254f 100644 (file)
@@ -27,8 +27,7 @@ vector<string> GetLineageCommand::getValidParameters(){
 //**********************************************************************************************************************
 GetLineageCommand::GetLineageCommand(){        
        try {
-               abort = true;
-               //initialize outputTypes
+               abort = true; calledHelp = true; 
                vector<string> tempOutNames;
                outputTypes["fasta"] = tempOutNames;
                outputTypes["taxonomy"] = tempOutNames;
@@ -68,10 +67,10 @@ vector<string> GetLineageCommand::getRequiredFiles(){
 //**********************************************************************************************************************
 GetLineageCommand::GetLineageCommand(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
@@ -238,7 +237,7 @@ void GetLineageCommand::help(){
 int GetLineageCommand::execute(){
        try {
                
-               if (abort == true) { return 0; }
+               if (abort == true) { if (calledHelp) { return 0; }  return 2;   }
                
                if (m->control_pressed) { return 0; }