]> git.donarmstrong.com Git - mothur.git/blobdiff - chimeracheckcommand.cpp
added [ERROR] flag if command aborts
[mothur.git] / chimeracheckcommand.cpp
index 3104fac58c9b6c4ff9bc1dc4870fcc77c0541853..c766b9a2dab6c2994df147423f61d14bf6f088a6 100644 (file)
@@ -47,6 +47,7 @@ vector<string> ChimeraCheckCommand::getRequiredFiles(){
 //**********************************************************************************************************************
 ChimeraCheckCommand::ChimeraCheckCommand(){    
        try {
+               abort = true; calledHelp = true;
                vector<string> tempOutNames;
                outputTypes["chimera"] = tempOutNames;
        }
@@ -58,10 +59,10 @@ ChimeraCheckCommand::ChimeraCheckCommand(){
 //***************************************************************************************************************
 ChimeraCheckCommand::ChimeraCheckCommand(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
@@ -280,7 +281,7 @@ ChimeraCheckCommand::~ChimeraCheckCommand(){        /*      do nothing      */      }
 int ChimeraCheckCommand::execute(){
        try{
                
-               if (abort == true) { return 0; }
+               if (abort == true) { if (calledHelp) { return 0; }  return 2;   }
                
                for (int i = 0; i < fastaFileNames.size(); i++) {