20#ifndef ESPRESSO_SRC_CORE_ERROR_HANDLING_RUNTIME_ERROR_HPP
21#define ESPRESSO_SRC_CORE_ERROR_HANDLING_RUNTIME_ERROR_HPP
23#include <boost/serialization/access.hpp>
24#include <boost/serialization/string.hpp>
51 int who()
const {
return m_who; }
53 std::string
what()
const {
return m_what; }
55 std::string
function()
const {
return m_function; }
57 std::string
file()
const {
return m_file; }
59 int line()
const {
return m_line; }
61 std::string
format()
const;
67 template <
class Archive>
void serialize(Archive &ar,
const unsigned int) {
79 std::string m_function;
ErrorLevel level() const
The error level.
int line() const
The line where the error occurred.
std::string what() const
The Error Message.
ErrorLevel
The error level, warnings are only displayed to the user, errors are fatal.
std::string format() const
Get a string representation.
friend class boost::serialization::access
Boost serialization.
std::string function() const
The function where the error occurred.
int who() const
Which MPI node raised the error.
std::string file() const
The file where the error occurred.
RuntimeError(ErrorLevel level, int who, std::string what, std::string function, std::string file, int line)