X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=raredisplay.cpp;h=b86312bc4411e8cdd2faca9934aab3abf5c96c52;hp=61362c78515b1ebaf3e0b006782960bfb33ebb91;hb=510b1cfc25cd79391d6973ca20c5ec25fb1bb3b2;hpb=37e0d78135e32b5aa58ca163f4d416716c78b67f diff --git a/raredisplay.cpp b/raredisplay.cpp index 61362c7..b86312b 100644 --- a/raredisplay.cpp +++ b/raredisplay.cpp @@ -24,11 +24,7 @@ void RareDisplay::init(string label){ } } catch(exception& e) { - cout << "Standard Error: " << e.what() << " has occurred in the RareDisplay class Function init. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; - exit(1); - } - catch(...) { - cout << "An unknown error has occurred in the RareDisplay class function init. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + errorOut(e, "RareDisplay", "init"); exit(1); } } @@ -59,11 +55,7 @@ void RareDisplay::update(SAbundVector* rank){ } } catch(exception& e) { - cout << "Standard Error: " << e.what() << " has occurred in the RareDisplay class Function update. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; - exit(1); - } - catch(...) { - cout << "An unknown error has occurred in the RareDisplay class function update. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + errorOut(e, "RareDisplay", "update"); exit(1); } } @@ -92,11 +84,7 @@ void RareDisplay::update(vector shared, int numSeqs, int nu } } catch(exception& e) { - cout << "Standard Error: " << e.what() << " has occurred in the RareDisplay class Function update. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; - exit(1); - } - catch(...) { - cout << "An unknown error has occurred in the RareDisplay class function update. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + errorOut(e, "RareDisplay", "update"); exit(1); } } @@ -119,14 +107,10 @@ void RareDisplay::reset(){ renameOk = rename(tempOutName.c_str(), tempInName.c_str()); //checks to make sure user was able to rename and remove successfully - if (renameOk != 0) { cout << "Unable to rename the necessary temp files." << endl; } + if (renameOk != 0) { mothurOut("Unable to rename the necessary temp files."); mothurOutEndLine(); } } catch(exception& e) { - cout << "Standard Error: " << e.what() << " has occurred in the RareDisplay class Function reset. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; - exit(1); - } - catch(...) { - cout << "An unknown error has occurred in the RareDisplay class function reset. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + errorOut(e, "RareDisplay", "reset"); exit(1); } } @@ -167,11 +151,7 @@ void RareDisplay::close(){ output->resetFile(); } catch(exception& e) { - cout << "Standard Error: " << e.what() << " has occurred in the RareDisplay class Function close. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; - exit(1); - } - catch(...) { - cout << "An unknown error has occurred in the RareDisplay class function close. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + errorOut(e, "RareDisplay", "close"); exit(1); } }