]> git.donarmstrong.com Git - mothur.git/blobdiff - clusterdoturcommand.cpp
added [ERROR] flag if command aborts
[mothur.git] / clusterdoturcommand.cpp
index 56fbd5c0d6c2b8e9380959bd6ba97435b28fcd70..b2b31edc27b9808ea9556e345d7d817429de1321 100644 (file)
@@ -25,8 +25,7 @@ vector<string> ClusterDoturCommand::getValidParameters(){
 //**********************************************************************************************************************
 ClusterDoturCommand::ClusterDoturCommand(){    
        try {
-               abort = true;
-               //initialize outputTypes
+               abort = true; calledHelp = true; 
                vector<string> tempOutNames;
                outputTypes["list"] = tempOutNames;
                outputTypes["rabund"] = tempOutNames;
@@ -65,10 +64,10 @@ vector<string> ClusterDoturCommand::getRequiredFiles(){
 ClusterDoturCommand::ClusterDoturCommand(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
@@ -189,7 +188,7 @@ ClusterDoturCommand::~ClusterDoturCommand(){}
 int ClusterDoturCommand::execute(){
        try {
        
-               if (abort == true) {    return 0;       }
+               if (abort == true) { if (calledHelp) { return 0; }  return 2;   }
                
                if(namefile != ""){     
                        nameMap = new NameAssignment(namefile);