X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=ordervector.cpp;h=27c1e934fa8a70c18e84235365a78231bf8ce6e9;hb=8f7164a88df624fd0a8d1eddbb3d744463cc9ecb;hp=333c280278d3cfa97d2a39373932018ba1d4b918;hpb=bfbc55964f1977da72c2cea984288a427d370a59;p=mothur.git diff --git a/ordervector.cpp b/ordervector.cpp index 333c280..27c1e93 100644 --- a/ordervector.cpp +++ b/ordervector.cpp @@ -7,10 +7,7 @@ * */ -using namespace std; - #include "ordervector.hpp" -#include "utilities.hpp" /***********************************************************************/ @@ -19,7 +16,7 @@ OrderVector::OrderVector() : DataVector() {} /***********************************************************************/ -//OrderVector::OrderVector(int ns) : DataVector(), data(ns, -1) {}; +//OrderVector::OrderVector(int ns) : DataVector(), data(ns, -1) {} /***********************************************************************/ @@ -50,11 +47,7 @@ OrderVector::OrderVector(ifstream& f) : DataVector() { updateStats(); } catch(exception& e) { - cout << "Standard Error: " << e.what() << " has occurred in the OrderVector class Function OrderVector. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; - exit(1); - } - catch(...) { - cout << "An unknown error has occurred in the OrderVector class function OrderVector. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + m->errorOut(e, "OrderVector", "OrderVector"); exit(1); } } @@ -119,11 +112,7 @@ void OrderVector::print(ostream& output){ output << endl; } catch(exception& e) { - cout << "Standard Error: " << e.what() << " has occurred in the OrderVector class Function print. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; - exit(1); - } - catch(...) { - cout << "An unknown error has occurred in the OrderVector class function print. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + m->errorOut(e, "OrderVector", "print"); exit(1); } } @@ -140,19 +129,15 @@ void OrderVector::print(string prefix, ostream& output){ output << endl; } catch(exception& e) { - cout << "Standard Error: " << e.what() << " has occurred in the OrderVector class Function print. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + m->errorOut(e, "OrderVector", "print"); exit(1); } - catch(...) { - cout << "An unknown error has occurred in the OrderVector class function print. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; - exit(1); - } } /***********************************************************************/ void OrderVector::resize(int){ - cout << "resize() did nothing in class OrderVector"; + m->mothurOut("resize() did nothing in class OrderVector"); } /***********************************************************************/ @@ -194,13 +179,9 @@ RAbundVector OrderVector::getRAbundVector(){ return rav; } catch(exception& e) { - cout << "Standard Error: " << e.what() << " has occurred in the OrderVector class Function getRAbundVector. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + m->errorOut(e, "OrderVector", "getRAbundVector"); exit(1); } - catch(...) { - cout << "An unknown error has occurred in the OrderVector class function getRAbundVector. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; - exit(1); - } } /***********************************************************************/ @@ -247,13 +228,9 @@ void OrderVector::updateStats(){ } } catch(exception& e) { - cout << "Standard Error: " << e.what() << " has occurred in the OrderVector class Function updateStats. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + m->errorOut(e, "OrderVector", "updateStats"); exit(1); } - catch(...) { - cout << "An unknown error has occurred in the OrderVector class function updateStats. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; - exit(1); - } } /***********************************************************************/