]> git.donarmstrong.com Git - mothur.git/blobdiff - sffinfocommand.cpp
added [ERROR] flag if command aborts
[mothur.git] / sffinfocommand.cpp
index c9bc469cf80c0871e7a4e8868ae1866960f4afcd..4a9271ce94df57f99e9734ba2b4d9d30d20872e9 100644 (file)
@@ -25,8 +25,7 @@ vector<string> SffInfoCommand::getValidParameters(){
 //**********************************************************************************************************************
 SffInfoCommand::SffInfoCommand(){      
        try {
-               abort = true;
-               //initialize outputTypes
+               abort = true; calledHelp = true; 
                vector<string> tempOutNames;
                outputTypes["fasta"] = tempOutNames;
                outputTypes["flow"] = tempOutNames;
@@ -65,11 +64,11 @@ vector<string> SffInfoCommand::getRequiredFiles(){
 
 SffInfoCommand::SffInfoCommand(string option)  {
        try {
-               abort = false;
+               abort = false; calledHelp = false;   
                hasAccnos = 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
@@ -279,7 +278,7 @@ SffInfoCommand::~SffInfoCommand(){}
 int SffInfoCommand::execute(){
        try {
                
-               if (abort == true) { return 0; }
+               if (abort == true) { if (calledHelp) { return 0; }  return 2;   }
                
                for (int s = 0; s < filenames.size(); s++) {