X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=nameassignment.cpp;h=3bcf6f9a968762adede9a4bd434320855b1e2398;hb=510b1cfc25cd79391d6973ca20c5ec25fb1bb3b2;hp=cf4e6774c32706d506d472963bda6f9ac86df7f1;hpb=163b300cfd7d4ca4e70c454be20f07b1d8346650;p=mothur.git diff --git a/nameassignment.cpp b/nameassignment.cpp index cf4e677..3bcf6f9 100644 --- a/nameassignment.cpp +++ b/nameassignment.cpp @@ -33,19 +33,9 @@ void NameAssignment::readMap(){ } fileHandle.close(); -// map::iterator it = data.begin(); -// for(it;it!=data.end();it++){ -// cout << it->first << endl; -// (*this)[it->first] = rowIndex; -// rowIndex++; -// } } catch(exception& e) { - cout << "Standard Error: " << e.what() << " has occurred in the NameAssignment class Function readMap. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; - exit(1); - } - catch(...) { - cout << "An unknown error has occurred in the NameAssignment class function readMap. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + errorOut(e, "NameAssignment", "readMap"); exit(1); } } @@ -64,15 +54,11 @@ void NameAssignment::print(void){ try { map::iterator it = (*this).begin(); for(it;it!=(*this).end();it++){ - cout << it->first << '\t' << it->second << endl; //prints out keys and values of the map this. + mothurOut(it->first + "\t" + toString(it->second)); mothurOutEndLine(); //prints out keys and values of the map this. } } catch(exception& e) { - cout << "Standard Error: " << e.what() << " has occurred in the NameAssignment class Function print. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; - exit(1); - } - catch(...) { - cout << "An unknown error has occurred in the NameAssignment class function print. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + errorOut(e, "NameAssignment", "print"); exit(1); } }