lxgui
Loading...
Searching...
No Matches
utils_exception.hpp
1#ifndef LXGUI_UTILS_EXCEPTION_HPP
2#define LXGUI_UTILS_EXCEPTION_HPP
3
4#include "lxgui/lxgui.hpp"
5#include "lxgui/utils.hpp"
6
7#include <string>
8
9namespace lxgui::utils {
10
12class exception : public std::exception {
13public:
18 exception() = default;
19
21 exception(const exception& other) = default;
22
28 explicit exception(const std::string& message);
29
36 exception(const std::string& class_name, const std::string& message);
37
42 const std::string& get_description() const;
43
48 const char* what() const noexcept override;
49
50protected:
51 std::string message_ = "Undefined exception.";
52};
53
54} // namespace lxgui::utils
55
56#endif
exception()=default
Default exception.
const char * what() const noexcept override
Override std::exception::what()
exception(const exception &other)=default
Copy constructor.
const std::string & get_description() const
Returns the message of the exception.
STL namespace.