FACT++  1.0
bool DataLogger::CheckForOfstreamError ( ofstream &  out,
bool  isDailyStream 
)
private

Checks if the input osftream is in error state, and if so close it.

Checks if the given ofstream is in error state and if so, close it

Parameters
outthe ofstream that should be checked

Definition at line 725 of file datalogger.cc.

References Error().

Referenced by Report().

726 {
727  if (out.good())
728  return true;
729 
730  Error("An error occured while writing to a text file. Closing it");
731  if (out.is_open())
732  out.close();
733  if (isDailyStream)
735  else
737 
738  return false;
739 }
void GoToNightlyWriteErrorState()
Go to Nightly Write Error State.
Definition: datalogger.cc:1970
void GoToRunWriteErrorState()
Goes to Write error states.
Definition: datalogger.cc:1960
int Error(const std::string &str)
Definition: MessageImp.h:49

+ Here is the call graph for this function:

+ Here is the caller graph for this function: