From: Don Armstrong Date: Mon, 16 Dec 2013 20:22:19 +0000 (-0800) Subject: add debugout to mothurout.cpp X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=f880ba4584d6bde072de3a5a2cfc16f704e1eafe;p=mothur.git add debugout to mothurout.cpp --- diff --git a/mothurout.cpp b/mothurout.cpp index 0f24cb2..2046adc 100644 --- a/mothurout.cpp +++ b/mothurout.cpp @@ -348,6 +348,30 @@ void MothurOut::mothurOut(string output) { } } /*********************************************************************************************/ +void MothurOut::debugOut(string output) { + try { + if (debug) { + mothurOut("[DEBUG]: "+output+"\n"); + } + } + catch(exception& e) { + errorOut(e, "MothurOut", "MothurOut"); + exit(1); + } +} +/*********************************************************************************************/ +void MothurOut::debugOut(string output,ofstream& outputFile) { + try { + if(debug) { + mothurOut("[DEBUG]: "+output+"\n",outputFile); + } + } + catch(exception& e) { + errorOut(e,"MothurOut","MothurOut"); + exit(1); + } +} +/*********************************************************************************************/ void MothurOut::mothurOutJustToScreen(string output) { try {