ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
ErrorHandling::RuntimeErrorCollector Class Reference

#include <RuntimeErrorCollector.hpp>

Public Member Functions

 RuntimeErrorCollector (boost::mpi::communicator comm)
 
 ~RuntimeErrorCollector ()
 
void message (RuntimeError::ErrorLevel level, const std::string &msg, const char *function, const char *file, int line)
 
void warning (const std::string &msg, const char *function, const char *file, int line)
 
void error (const std::string &msg, const char *function, const char *file, int line)
 
int count () const
 Get the number of all flying messages on all nodes.
 
int count (RuntimeError::ErrorLevel level)
 Get the number of messages that have at least severity level on this node.
 
void clear ()
 Reset error messages.
 
void flush ()
 Flush error messages to standard error.
 
std::vector< RuntimeErrorgather ()
 
void gather_local ()
 
const boost::mpi::communicator & comm () const
 

Detailed Description

Definition at line 33 of file RuntimeErrorCollector.hpp.

Constructor & Destructor Documentation

◆ RuntimeErrorCollector()

ErrorHandling::RuntimeErrorCollector::RuntimeErrorCollector ( boost::mpi::communicator  comm)
explicit

Definition at line 36 of file RuntimeErrorCollector.cpp.

◆ ~RuntimeErrorCollector()

ErrorHandling::RuntimeErrorCollector::~RuntimeErrorCollector ( )

Definition at line 39 of file RuntimeErrorCollector.cpp.

References flush().

Member Function Documentation

◆ clear()

void ErrorHandling::RuntimeErrorCollector::clear ( )

Reset error messages.

Definition at line 82 of file RuntimeErrorCollector.cpp.

References stream.

Referenced by flush(), and gather_local().

◆ comm()

const boost::mpi::communicator & ErrorHandling::RuntimeErrorCollector::comm ( ) const
inline

Definition at line 76 of file RuntimeErrorCollector.hpp.

◆ count() [1/2]

int ErrorHandling::RuntimeErrorCollector::count ( ) const

Get the number of all flying messages on all nodes.

Returns
Total number of messages.

Definition at line 71 of file RuntimeErrorCollector.cpp.

References stream.

◆ count() [2/2]

int ErrorHandling::RuntimeErrorCollector::count ( RuntimeError::ErrorLevel  level)

Get the number of messages that have at least severity level on this node.

Parameters
levelSeverity filter.
Returns
Number of messages that match the filter.

Definition at line 77 of file RuntimeErrorCollector.cpp.

References stream.

◆ error()

void ErrorHandling::RuntimeErrorCollector::error ( const std::string &  msg,
const char function,
const char file,
int  line 
)

Definition at line 64 of file RuntimeErrorCollector.cpp.

References ErrorHandling::RuntimeError::ERROR, and stream.

◆ flush()

void ErrorHandling::RuntimeErrorCollector::flush ( )

Flush error messages to standard error.

Definition at line 87 of file RuntimeErrorCollector.cpp.

References clear(), and stream.

Referenced by ~RuntimeErrorCollector().

◆ gather()

std::vector< RuntimeError > ErrorHandling::RuntimeErrorCollector::gather ( )

Definition at line 97 of file RuntimeErrorCollector.cpp.

References Utils::Mpi::gather_buffer(), and stream.

◆ gather_local()

void ErrorHandling::RuntimeErrorCollector::gather_local ( )

Definition at line 107 of file RuntimeErrorCollector.cpp.

References clear(), Utils::Mpi::gather_buffer(), and stream.

◆ message()

void ErrorHandling::RuntimeErrorCollector::message ( RuntimeError::ErrorLevel  level,
const std::string &  msg,
const char function,
const char file,
int  line 
)

Definition at line 47 of file RuntimeErrorCollector.cpp.

References stream.

Referenced by ErrorHandling::RuntimeErrorStream::~RuntimeErrorStream().

◆ warning()

void ErrorHandling::RuntimeErrorCollector::warning ( const std::string &  msg,
const char function,
const char file,
int  line 
)

Definition at line 56 of file RuntimeErrorCollector.cpp.

References stream, and ErrorHandling::RuntimeError::WARNING.


The documentation for this class was generated from the following files: