]> git.donarmstrong.com Git - mothur.git/blobdiff - readtreecommand.cpp
added [ERROR] flag if command aborts
[mothur.git] / readtreecommand.cpp
index edfdf3b77e0d85ff51afce83323d0204ab987a66..05a65b736f93c376525b1cf64e2ed8275fc9c486 100644 (file)
@@ -48,10 +48,10 @@ vector<string> ReadTreeCommand::getRequiredFiles(){
 ReadTreeCommand::ReadTreeCommand(string option)  {
        try {
                globaldata = GlobalData::getInstance();
-               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
@@ -178,7 +178,7 @@ ReadTreeCommand::~ReadTreeCommand(){
 int ReadTreeCommand::execute(){
        try {
        
-               if (abort == true) { return 0; }
+               if (abort == true) { if (calledHelp) { return 0; }  return 2;   }
                
                int readOk;