X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=mothur.h;h=2efdda8bda209ec303dd7e6bc1b8650b5eb65949;hb=28d65de5f06f5b033109a3b8bbb6d3c4060914d3;hp=20d3b4b64725d0428248b47b22a3146a0a3a52c9;hpb=510b1cfc25cd79391d6973ca20c5ec25fb1bb3b2;p=mothur.git diff --git a/mothur.h b/mothur.h index 20d3b4b..2efdda8 100644 --- a/mothur.h +++ b/mothur.h @@ -60,7 +60,7 @@ using namespace std; #endif -typedef unsigned long long ull; +typedef unsigned long ull; struct IntNode { int lvalue; @@ -153,14 +153,13 @@ string toString(const T&x, int i){ return output.str(); } - /***********************************************************************/ inline int openOutputFileAppend(string fileName, ofstream& fileHandle){ fileHandle.open(fileName.c_str(), ios::app); if(!fileHandle) { - cerr << "Error: Could not open " << fileName << endl; + cout << "Error: Could not open " << fileName << endl; return 1; } else { @@ -169,7 +168,6 @@ inline int openOutputFileAppend(string fileName, ofstream& fileHandle){ } - /**************************************************************************************************/ inline void mothurOut(string message) { @@ -233,12 +231,14 @@ inline void errorOut(exception& e, string object, string function) { mothurOut("Error: "); mothurOut(toString(e.what())); - mothurOut(" has occurred in the " + object + " class function " + function + "Please contact Pat Schloss at pschloss@microbio.umass.edu, and be sure to include the mothur.logFile with your inquiry."); + mothurOut(" has occurred in the " + object + " class function " + function + ". Please contact Pat Schloss at pschloss@microbio.umass.edu, and be sure to include the mothur.logFile with your inquiry."); mothurOutEndLine(); } + + /***********************************************************************/ inline void gobble(istream& f){ @@ -394,7 +394,7 @@ inline int openInputFile(string fileName, ifstream& fileHandle){ fileHandle.open(fileName.c_str()); if(!fileHandle) { - cerr << "Error: Could not open " << fileName << endl; + mothurOut("Error: Could not open " + fileName); mothurOutEndLine(); return 1; } else { @@ -409,7 +409,7 @@ inline int openOutputFile(string fileName, ofstream& fileHandle){ fileHandle.open(fileName.c_str(), ios::trunc); if(!fileHandle) { - cerr << "Error: Could not open " << fileName << endl; + mothurOut("Error: Could not open " + fileName); mothurOutEndLine(); return 1; } else {