]> git.donarmstrong.com Git - mothur.git/blobdiff - chimerapintailcommand.cpp
added [ERROR] flag if command aborts
[mothur.git] / chimerapintailcommand.cpp
index c5e579e730e1cfbd3da0040359393ef08b497295..a8d2d65c6c3752fcc7ca9737e505c32850d62f7b 100644 (file)
@@ -25,6 +25,7 @@ vector<string> ChimeraPintailCommand::getValidParameters(){
 //**********************************************************************************************************************
 ChimeraPintailCommand::ChimeraPintailCommand(){        
        try {
+               abort = true; calledHelp = true;
                vector<string> tempOutNames;
                outputTypes["chimera"] = tempOutNames;
                outputTypes["accnos"] = tempOutNames;
@@ -60,10 +61,10 @@ vector<string> ChimeraPintailCommand::getRequiredFiles(){
 //***************************************************************************************************************
 ChimeraPintailCommand::ChimeraPintailCommand(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
@@ -309,7 +310,7 @@ ChimeraPintailCommand::~ChimeraPintailCommand(){    /*      do nothing      */      }
 int ChimeraPintailCommand::execute(){
        try{
                
-               if (abort == true) { return 0; }
+               if (abort == true) { if (calledHelp) { return 0; }  return 2;   }
                
                for (int s = 0; s < fastaFileNames.size(); s++) {