X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=progress.cpp;h=6899e76e1940e2408567ce0e7212a7315266f143;hp=65c01b934ada20c9a3a294ce2351d515d0eafe5f;hb=510b1cfc25cd79391d6973ca20c5ec25fb1bb3b2;hpb=37e0d78135e32b5aa58ca163f4d416716c78b67f diff --git a/progress.cpp b/progress.cpp index 65c01b9..6899e76 100644 --- a/progress.cpp +++ b/progress.cpp @@ -18,17 +18,13 @@ const char marker = '|'; Progress::Progress(){ try { - cout << "********************#****#****#****#****#****#****#****#****#****#****#"; + mothurOut("********************#****#****#****#****#****#****#****#****#****#****#"); nTicks = 0; finalPos = 0; } catch(exception& e) { - cout << "Standard Error: " << e.what() << " has occurred in the Progress class Function Progress. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; - exit(1); - } - catch(...) { - cout << "An unknown error has occurred in the Progress class function Progress. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + errorOut(e, "Progress", "Progress"); exit(1); } } @@ -37,19 +33,17 @@ Progress::Progress(){ Progress::Progress(string job, int end){ try { - cout << "********************#****#****#****#****#****#****#****#****#****#****#\n"; + mothurOut("********************#****#****#****#****#****#****#****#****#****#****#\n"); cout << setw(20) << left << job << setw(1) << marker; + mothurOutJustToLog(job); + mothurOut(toString(marker)); cout.flush(); nTicks = 0; finalPos = end; } catch(exception& e) { - cout << "Standard Error: " << e.what() << " has occurred in the Progress class Function Progress. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; - exit(1); - } - catch(...) { - cout << "An unknown error has occurred in the Progress class function Progress. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + errorOut(e, "Progress", "Progress"); exit(1); } } @@ -58,19 +52,17 @@ Progress::Progress(string job, int end){ void Progress::newLine(string job, int end){ try { - cout << endl; + mothurOutEndLine(); cout << setw(20) << left << job << setw(1) << marker; + mothurOutJustToLog(job); + mothurOut(toString(marker)); cout.flush(); nTicks = 0; finalPos = end; } catch(exception& e) { - cout << "Standard Error: " << e.what() << " has occurred in the Progress class Function newline. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; - exit(1); - } - catch(...) { - cout << "An unknown error has occurred in the Progress class function newline. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + errorOut(e, "Progress", "newLine"); exit(1); } } @@ -83,18 +75,14 @@ void Progress::update(const int currentPos){ if(ratio > nTicks){ for(int i=nTicks;i