]> git.donarmstrong.com Git - mothur.git/blobdiff - venncommand.cpp
added [ERROR] flag if command aborts
[mothur.git] / venncommand.cpp
index 7601ed8e667b10e2b2cd6eaf48c8f5ce365cc6f0..5cc0fea3affdfa6d021ff93bef964f478400f5bc 100644 (file)
@@ -33,8 +33,7 @@ vector<string> VennCommand::getValidParameters(){
 //**********************************************************************************************************************
 VennCommand::VennCommand(){    
        try {
-               abort = true;
-               //initialize outputTypes
+               abort = true; calledHelp = true; 
                vector<string> tempOutNames;
                outputTypes["svg"] = tempOutNames;
        }
@@ -71,12 +70,12 @@ vector<string> VennCommand::getRequiredFiles(){
 VennCommand::VennCommand(string option)  {
        try {
                globaldata = GlobalData::getInstance();
-               abort = false;
+               abort = false; calledHelp = false;   
                allLines = 1;
                labels.clear();
                        
                //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
@@ -243,7 +242,7 @@ VennCommand::~VennCommand(){
 int VennCommand::execute(){
        try {
        
-               if (abort == true) { return 0; }
+               if (abort == true) { if (calledHelp) { return 0; }  return 2;   }
                
                string lastLabel;