20#ifndef ESPRESSO_SRC_CORE_ERROR_HANDLING_RUNTIME_ERROR_COLLECTOR_HPP
21#define ESPRESSO_SRC_CORE_ERROR_HANDLING_RUNTIME_ERROR_COLLECTOR_HPP
25#include <boost/mpi/communicator.hpp>
42 const char *function,
const char *file,
int line);
44 void warning(
const std::string &msg,
const char *function,
const char *file,
46 void warning(
const char *msg,
const char *function,
const char *file,
48 void warning(
const std::ostringstream &mstr,
const char *function,
49 const char *file,
int line);
51 void error(
const std::string &msg,
const char *function,
const char *file,
53 void error(
const char *msg,
const char *function,
const char *file,
int line);
54 void error(
const std::ostringstream &mstr,
const char *function,
55 const char *file,
int line);
83 std::vector<RuntimeError>
gather();
86 const boost::mpi::communicator &
comm()
const {
return m_comm; }
89 mutable std::mutex mutex;
90 std::vector<RuntimeError> m_errors;
91 boost::mpi::communicator m_comm;
void clear()
Reset error messages.
void message(RuntimeError message)
void flush()
Flush error messages to standard error.
std::vector< RuntimeError > gather()
int count() const
Get the number of all flying messages on all nodes.
void error(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)
const boost::mpi::communicator & comm() const
ErrorLevel
The error level, warnings are only displayed to the user, errors are fatal.