idol
A C++ Framework for Optimization
Loading...
Searching...
No Matches
Exception.h
1//
2// Created by henri on 21/09/22.
3//
4
5#ifndef OPTIMIZE_EXCEPTION_H
6#define OPTIMIZE_EXCEPTION_H
7
8#include <iostream>
9
10namespace idol {
11 class Exception;
12}
13
14class idol::Exception : public std::exception {
15 const std::string m_message;
16public:
17 explicit Exception(std::string t_message) : m_message(std::move(t_message)) {}
18
19 [[nodiscard]] const char * what () const noexcept override { return m_message.c_str(); }
20};
21
22#endif //OPTIMIZE_EXCEPTION_H