X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=quitcommand.cpp;h=2c302e9e6b4f195c7d4acb1df97fd6110ea02ad5;hb=372fb21ea66ced432b109225851a1b80ef0491a3;hp=87c2fa0672478e9899c60887ff0aa459f79551ee;hpb=0470f6d037aacb3563c3f7010708120a4a67d4e6;p=mothur.git diff --git a/quitcommand.cpp b/quitcommand.cpp index 87c2fa0..2c302e9 100644 --- a/quitcommand.cpp +++ b/quitcommand.cpp @@ -10,42 +10,19 @@ #include "quitcommand.h" //********************************************************************************************************************** - -QuitCommand::QuitCommand(string option){ - abort = false; +QuitCommand::QuitCommand(string option) { + abort = false; calledHelp = false; //allow user to run help - if(option == "help") { help(); abort = true; } - - else if (option != "") { cout << "There are no valid parameters for the quit command." << endl; abort = true; } - -} -//********************************************************************************************************************** + if(option == "help") { help(); abort = true; calledHelp = true; } + else if(option == "citation") { citation(); abort = true; calledHelp = true;} -void QuitCommand::help(){ - try { - cout << "The quit command will terminate mothur and should be in the following format: " << "\n"; - cout << "quit() or quit" << "\n" << "\n"; - } - catch(exception& e) { - cout << "Standard Error: " << e.what() << " has occurred in the QuitCommand class Function help. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; - exit(1); - } - catch(...) { - cout << "An unknown error has occurred in the QuitCommand class function help. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; - exit(1); - } } - //********************************************************************************************************************** - QuitCommand::~QuitCommand(){} - //********************************************************************************************************************** - int QuitCommand::execute(){ if (abort == true) { return 0; } return 1; } - //**********************************************************************************************************************