]> git.donarmstrong.com Git - mothur.git/blobdiff - binsequencecommand.cpp
added [ERROR] flag if command aborts
[mothur.git] / binsequencecommand.cpp
index bf14d6b07b3b6ae64c20d3072abb3c3603a9e42c..81c24a33713a6a0a732f3c9e6b7cbe99e10dc02d 100644 (file)
@@ -48,8 +48,7 @@ vector<string> BinSeqCommand::getRequiredFiles(){
 //**********************************************************************************************************************
 BinSeqCommand::BinSeqCommand(){        
        try {
-               abort = true;
-               //initialize outputTypes
+               abort = true; calledHelp = true; 
                vector<string> tempOutNames;
                outputTypes["fasta"] = tempOutNames;
        }
@@ -62,12 +61,12 @@ BinSeqCommand::BinSeqCommand(){
 BinSeqCommand::BinSeqCommand(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
@@ -218,7 +217,7 @@ BinSeqCommand::~BinSeqCommand(){
 
 int BinSeqCommand::execute(){
        try {
-               if (abort == true) {    return 0;       }
+               if (abort == true) { if (calledHelp) { return 0; }  return 2;   }
        
                int error = 0;