From 763884900002bbb84cb0f1976737725a654d2335 Mon Sep 17 00:00:00 2001 From: James Turk Date: Fri, 11 Jul 2003 00:27:26 +0000 Subject: [PATCH] add flush to error handling --- src/ZE_ZEngine.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/ZE_ZEngine.cpp b/src/ZE_ZEngine.cpp index d303204..d3ecb97 100644 --- a/src/ZE_ZEngine.cpp +++ b/src/ZE_ZEngine.cpp @@ -13,7 +13,7 @@ \brief Central source file for ZEngine. Actual implementation of ZEngine singleton class, the core of ZEngine. -
$Id: ZE_ZEngine.cpp,v 1.49 2003/07/05 01:02:05 cozman Exp $
+
$Id: ZE_ZEngine.cpp,v 1.50 2003/07/11 00:27:26 cozman Exp $
\author James Turk **/ @@ -588,10 +588,7 @@ void ZEngine::ReportError(ZErrorCode code, std::string desc, std::string file, u mCurError.Create(code,desc,file,line); if(mLogAllErrors) - { LogError(mCurError); - std::fflush(mErrlog); - } else mErrorQueue.push(mCurError); } @@ -607,11 +604,13 @@ void ZEngine::WriteLog(std::string str) { std::fprintf(mErrlog,str.c_str()); std::fprintf(mErrlog,"\n"); + std::fflush(mErrlog); } void ZEngine::LogError(ZError error) { std::fprintf(mErrlog,error.LogString().c_str()); + std::fflush(mErrlog); } void ZEngine::FlushErrors()