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

A runtime error. More...

#include <RuntimeError.hpp>

Public Types

enum class  ErrorLevel { DEBUG , INFO , WARNING , ERROR }
 The error level, warnings are only displayed to the user, errors are fatal. More...
 

Public Member Functions

 RuntimeError ()=default
 
 RuntimeError (ErrorLevel level, int who, std::string what, std::string function, std::string file, int line)
 
ErrorLevel level () const
 The error level.
 
int who () const
 Which MPI node raised the error.
 
std::string what () const
 The Error Message.
 
std::string function () const
 The function where the error occurred.
 
std::string file () const
 The file where the error occurred.
 
int line () const
 The line where the error occurred.
 
std::string format () const
 Get a string representation.
 
void print () const
 

Friends

class boost::serialization::access
 Boost serialization.
 

Detailed Description

A runtime error.

This class describes a runtime error, including where it occurred and its severity.

Definition at line 36 of file RuntimeError.hpp.

Member Enumeration Documentation

◆ ErrorLevel

The error level, warnings are only displayed to the user, errors are fatal.

Enumerator
DEBUG 
INFO 
WARNING 
ERROR 

Definition at line 40 of file RuntimeError.hpp.

Constructor & Destructor Documentation

◆ RuntimeError() [1/2]

ErrorHandling::RuntimeError::RuntimeError ( )
default

◆ RuntimeError() [2/2]

ErrorHandling::RuntimeError::RuntimeError ( ErrorLevel  level,
int  who,
std::string  what,
std::string  function,
std::string  file,
int  line 
)
inline

Definition at line 42 of file RuntimeError.hpp.

Member Function Documentation

◆ file()

std::string ErrorHandling::RuntimeError::file ( ) const
inline

The file where the error occurred.

Definition at line 57 of file RuntimeError.hpp.

Referenced by format().

◆ format()

std::string ErrorHandling::RuntimeError::format ( ) const

Get a string representation.

Definition at line 28 of file RuntimeError.cpp.

References DEBUG, ERROR, file(), function(), INFO, line(), WARNING, what(), and who().

Referenced by print().

◆ function()

std::string ErrorHandling::RuntimeError::function ( ) const
inline

The function where the error occurred.

Definition at line 55 of file RuntimeError.hpp.

Referenced by format().

◆ level()

ErrorLevel ErrorHandling::RuntimeError::level ( ) const
inline

The error level.

Definition at line 49 of file RuntimeError.hpp.

◆ line()

int ErrorHandling::RuntimeError::line ( ) const
inline

The line where the error occurred.

Definition at line 59 of file RuntimeError.hpp.

Referenced by format().

◆ print()

void ErrorHandling::RuntimeError::print ( ) const

Definition at line 57 of file RuntimeError.cpp.

References format().

◆ what()

std::string ErrorHandling::RuntimeError::what ( ) const
inline

The Error Message.

Definition at line 53 of file RuntimeError.hpp.

Referenced by format().

◆ who()

int ErrorHandling::RuntimeError::who ( ) const
inline

Which MPI node raised the error.

Definition at line 51 of file RuntimeError.hpp.

Referenced by format().

Friends And Related Symbol Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Boost serialization.

Definition at line 66 of file RuntimeError.hpp.


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