]> git.donarmstrong.com Git - mothur.git/blobdiff - ordervector.cpp
changing command name classify.shared to classifyrf.shared
[mothur.git] / ordervector.cpp
index e3062059acef0678300a8642f7432a34d7410879..a6dff32386beb1cfeae07a1aa9f01decee5ea0f1 100644 (file)
@@ -47,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);
        }
 }
@@ -77,7 +73,14 @@ int OrderVector::getMaxRank(){
        if(needToUpdate == 1){  updateStats();  }
        return maxRank;
 }
+/***********************************************************************/
 
+void OrderVector::clear(){
+       numBins = 0;
+       maxRank = 0;
+       numSeqs = 0;
+       data.clear();
+}
 /***********************************************************************/
 
 
@@ -116,11 +119,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);
        }
 }
@@ -137,19 +136,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");
 }
 
 /***********************************************************************/
@@ -191,13 +186,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);
-       }       
 }
 
 /***********************************************************************/
@@ -244,13 +235,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);
-       }       
 }
 
 /***********************************************************************/