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.

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.

◆ 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.

◆ 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.

◆ flush()

void ErrorHandling::RuntimeErrorCollector::flush ( )

Flush error messages to standard error.

Definition at line 87 of file RuntimeErrorCollector.cpp.

References clear().

Referenced by ~RuntimeErrorCollector().

◆ gather()

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

Definition at line 97 of file RuntimeErrorCollector.cpp.

References Utils::Mpi::gather_buffer().

◆ gather_local()

void ErrorHandling::RuntimeErrorCollector::gather_local ( )

Definition at line 107 of file RuntimeErrorCollector.cpp.

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

◆ message()

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

◆ 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 ErrorHandling::RuntimeError::WARNING.


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