]> git.donarmstrong.com Git - mothur.git/blobdiff - rarefact.cpp
added logfile feature
[mothur.git] / rarefact.cpp
index ba0c02e2a474545474e4cf13efbdc633bfbbb3a3..f1b43fc26553cd739d32d2baeff36bc457df006a 100644 (file)
@@ -63,11 +63,7 @@ void Rarefact::getCurve(int increment = 1, int nIters = 1000){
                delete rcd;
        }
        catch(exception& e) {
-               cout << "Standard Error: " << e.what() << " has occurred in the Rarefact class Function getCurve. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
-               exit(1);
-       }
-       catch(...) {
-               cout << "An unknown error has occurred in the Rarefact class function getCurve. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+               errorOut(e, "Rarefact", "getCurve");
                exit(1);
        }
 }
@@ -118,6 +114,7 @@ try {
                                displays[i]->reset();
                        }
                        
+                       delete merge;
                }
                
                for(int i=0;i<displays.size();i++){
@@ -127,14 +124,9 @@ try {
                delete rcd;
        }
        catch(exception& e) {
-               cout << "Standard Error: " << e.what() << " has occurred in the Rarefact class Function getSharedCurve. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
-               exit(1);
-       }
-       catch(...) {
-               cout << "An unknown error has occurred in the Rarefact class function getSharedCurve. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+               errorOut(e, "Rarefact", "getSharedCurve");
                exit(1);
        }
-
 }
 
 /**************************************************************************************/
@@ -146,12 +138,8 @@ void Rarefact::mergeVectors(SharedRAbundVector* shared1, SharedRAbundVector* sha
                }
        }
        catch(exception& e) {
-               cout << "Standard Error: " << e.what() << " has occurred in the Rarefact class Function mergeVectors. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+               errorOut(e, "Rarefact", "mergeVectors");
                exit(1);
        }
-       catch(...) {
-               cout << "An unknown error has occurred in the Rarefact class function mergeVectors. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
-               exit(1);
-       }       
 }