]> git.donarmstrong.com Git - mothur.git/blobdiff - chimerabellerophoncommand.cpp
added [ERROR] flag if command aborts
[mothur.git] / chimerabellerophoncommand.cpp
index 5d7d6d452b2c741ad764623557f0a0d31895ba0e..22e4fe2956e18100b1e6a4920c25b9237a8d5504 100644 (file)
@@ -48,8 +48,7 @@ vector<string> ChimeraBellerophonCommand::getRequiredFiles(){
 //**********************************************************************************************************************
 ChimeraBellerophonCommand::ChimeraBellerophonCommand(){        
        try {
-               abort = true;
-               //initialize outputTypes
+               abort = true; calledHelp = true; 
                vector<string> tempOutNames;
                outputTypes["chimera"] = tempOutNames;
                outputTypes["accnos"] = tempOutNames;
@@ -63,10 +62,10 @@ ChimeraBellerophonCommand::ChimeraBellerophonCommand(){
 //***************************************************************************************************************
 ChimeraBellerophonCommand::ChimeraBellerophonCommand(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
@@ -210,7 +209,7 @@ ChimeraBellerophonCommand::~ChimeraBellerophonCommand(){    /*      do nothing      */      }
 int ChimeraBellerophonCommand::execute(){
        try{
                
-               if (abort == true) { return 0; }
+               if (abort == true) { if (calledHelp) { return 0; }  return 2;   }
                
                for (int i = 0; i < fastaFileNames.size(); i++) {