From f880ba4584d6bde072de3a5a2cfc16f704e1eafe Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Mon, 16 Dec 2013 12:22:19 -0800 Subject: [PATCH] add debugout to mothurout.cpp --- mothurout.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) 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 { -- 2.39.5