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 message)
 
void message (const RuntimeError &message)
 
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 warning (const char *msg, const char *function, const char *file, int line)
 
void warning (const std::ostringstream &mstr, const char *function, const char *file, int line)
 
void error (const std::string &msg, const char *function, const char *file, int line)
 
void error (const char *msg, const char *function, const char *file, int line)
 
void error (const std::ostringstream &mstr, 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 109 of file RuntimeErrorCollector.cpp.

Referenced by flush(), and gather_local().

◆ comm()

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

Definition at line 85 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 98 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 103 of file RuntimeErrorCollector.cpp.

◆ error() [1/3]

void ErrorHandling::RuntimeErrorCollector::error ( const char *  msg,
const char *  function,
const char *  file,
int  line 
)

Definition at line 87 of file RuntimeErrorCollector.cpp.

References error().

◆ error() [2/3]

void ErrorHandling::RuntimeErrorCollector::error ( const std::ostringstream &  mstr,
const char *  function,
const char *  file,
int  line 
)

Definition at line 92 of file RuntimeErrorCollector.cpp.

References error().

◆ error() [3/3]

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

Definition at line 81 of file RuntimeErrorCollector.cpp.

References ErrorHandling::RuntimeError::ERROR.

Referenced by error(), and error().

◆ flush()

void ErrorHandling::RuntimeErrorCollector::flush ( )

Flush error messages to standard error.

Definition at line 111 of file RuntimeErrorCollector.cpp.

References clear().

Referenced by ~RuntimeErrorCollector().

◆ gather()

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

Definition at line 118 of file RuntimeErrorCollector.cpp.

References Utils::Mpi::gather_buffer().

◆ gather_local()

void ErrorHandling::RuntimeErrorCollector::gather_local ( )

Definition at line 127 of file RuntimeErrorCollector.cpp.

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

◆ message() [1/3]

void ErrorHandling::RuntimeErrorCollector::message ( const RuntimeError message)

Definition at line 47 of file RuntimeErrorCollector.cpp.

References message().

◆ message() [2/3]

void ErrorHandling::RuntimeErrorCollector::message ( RuntimeError  message)

◆ message() [3/3]

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

Definition at line 55 of file RuntimeErrorCollector.cpp.

◆ warning() [1/3]

void ErrorHandling::RuntimeErrorCollector::warning ( const char *  msg,
const char *  function,
const char *  file,
int  line 
)

Definition at line 70 of file RuntimeErrorCollector.cpp.

References warning().

◆ warning() [2/3]

void ErrorHandling::RuntimeErrorCollector::warning ( const std::ostringstream &  mstr,
const char *  function,
const char *  file,
int  line 
)

Definition at line 75 of file RuntimeErrorCollector.cpp.

References warning().

◆ warning() [3/3]

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

Definition at line 63 of file RuntimeErrorCollector.cpp.

References ErrorHandling::RuntimeError::WARNING.

Referenced by warning(), and warning().


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