From d91607335b086937c5ac279bf0d0480f58804d20 Mon Sep 17 00:00:00 2001 From: Scott R Charlton Date: Fri, 13 Jul 2012 00:32:01 +0000 Subject: [PATCH] fixed for latest phreeqc3 (only TestIPhreeqcLib) git-svn-id: svn://136.177.114.72/svn_GW/IPhreeqc/trunk@6778 1feff8c3-07ed-0310-ac33-dd36852eb9cd --- IPhreeqc.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/IPhreeqc.cpp b/IPhreeqc.cpp index 2cb432db..df677105 100644 --- a/IPhreeqc.cpp +++ b/IPhreeqc.cpp @@ -1252,7 +1252,15 @@ void IPhreeqc::log_msg(const char * str) void IPhreeqc::error_msg(const char *str, bool stop) { ASSERT(!(this->ErrorFileOn ^ (this->error_ostream != 0))); + + if (this->error_ostream != NULL && this->error_on) + { + (*this->error_ostream) << str; + } + bool save_error_on = this->error_on; + this->error_on = false; this->PHRQ_io::error_msg(str); + this->error_on = save_error_on; if (this->ErrorStringOn && this->error_on) { @@ -1272,7 +1280,15 @@ void IPhreeqc::error_msg(const char *str, bool stop) void IPhreeqc::warning_msg(const char *str) { ASSERT(!(this->ErrorFileOn ^ (this->error_ostream != 0))); + + if (this->error_ostream != NULL && this->error_on) + { + (*this->error_ostream) << str << "\n"; + } + bool save_error_on = this->error_on; + this->error_on = false; this->PHRQ_io::warning_msg(str); + this->error_on = save_error_on; std::ostringstream oss; oss << str << std::endl;