]> git.donarmstrong.com Git - mothur.git/blobdiff - chimeraccodecommand.cpp
added [ERROR] flag if command aborts
[mothur.git] / chimeraccodecommand.cpp
index 223ddb23c1bec61748ce62217001dfac04b565ac..8a4ccdedea59eb676ecf4f2161e9c1719db8f72a 100644 (file)
@@ -25,6 +25,7 @@ vector<string> ChimeraCcodeCommand::getValidParameters(){
 //**********************************************************************************************************************
 ChimeraCcodeCommand::ChimeraCcodeCommand(){    
        try {
+               abort = true; calledHelp = true;
                vector<string> tempOutNames;
                outputTypes["chimera"] = tempOutNames;
                outputTypes["mapinfo"] = tempOutNames;
@@ -61,10 +62,10 @@ vector<string> ChimeraCcodeCommand::getRequiredFiles(){
 //***************************************************************************************************************
 ChimeraCcodeCommand::ChimeraCcodeCommand(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
@@ -239,7 +240,7 @@ ChimeraCcodeCommand::~ChimeraCcodeCommand(){        /*      do nothing      */      }
 int ChimeraCcodeCommand::execute(){
        try{
                
-               if (abort == true) { return 0; }
+               if (abort == true) { if (calledHelp) { return 0; }  return 2;   }
                
                for (int s = 0; s < fastaFileNames.size(); s++) {