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*
24 what() const noexcept override
25 {
26
27 return msg.c_str();
28 }
29
30 private:
32 std::string msg;
33 [[nodiscard]] std::string getMessage() const;
34 };
35} // namespace Simulation
36
37#endif
ErrorCodes code_
Definition simulation_exception.hpp:31
std::string msg
Definition simulation_exception.hpp:32
const char * what() const noexcept override
Definition simulation_exception.hpp:24
SimulationException(ErrorCodes code)
Definition simulation_exception.cpp:5
std::string getMessage() const
Definition simulation_exception.cpp:11
Namespace that contains classes and structures related to simulation handling.
Definition host_specific.hpp:14
ErrorCodes
Definition simulation_exception.hpp:11
@ MismatchSize
Definition simulation_exception.hpp:15
@ BadConcentrationInitLiq
Definition simulation_exception.hpp:12
@ BadConcentrationInitGas
Definition simulation_exception.hpp:13
@ BadInitialiser
Definition simulation_exception.hpp:14