BioCMAMC-ST
simulation_exception.hpp
1#ifndef __SIMULATION_EXCEPTION_HPP__
2#define __SIMULATION_EXCEPTION_HPP__
3
4#include <exception>
5#include <stdexcept>
6#include <string>
7namespace Simulation
8{
9
17
18 class SimulationException : public std::exception
19 {
20 public:
21 explicit SimulationException(ErrorCodes code);
22
23 [[nodiscard]] const char *what() const noexcept override
24 {
25
26 return msg.c_str();
27 }
28
29 private:
31 std::string msg;
32 [[nodiscard]] std::string getMessage() const;
33 };
34} // namespace Simulation
35
36#endif
Definition simulation_exception.hpp:19
ErrorCodes code_
Definition simulation_exception.hpp:30
std::string msg
Definition simulation_exception.hpp:31
const char * what() const noexcept override
Definition simulation_exception.hpp:23
SimulationException(ErrorCodes code)
Definition simulation_exception.cpp:5
std::string getMessage() const
Definition simulation_exception.cpp:10
Namespace that contains classes and structures related to simulation handling.
Definition host_specific.hpp:12
ErrorCodes
Definition simulation_exception.hpp:11