libdonut  2.3.2
Application framework for cross-platform game development in C++20
Error.hpp
Go to the documentation of this file.
1 #ifndef DONUT_EVENTS_ERROR_HPP
2 #define DONUT_EVENTS_ERROR_HPP
3 
4 #include <stdexcept> // std::runtime_error
5 #include <string> // std::string
6 
7 namespace donut::events {
8 
13 struct Error : std::runtime_error {
14  explicit Error(const std::string& message)
15  : std::runtime_error(message) {}
16 
17  explicit Error(const char* message)
18  : std::runtime_error(message) {}
19 };
20 
21 } // namespace donut::events
22 
23 #endif
Definition: Error.hpp:7
Exception type for domain-specific errors originating from the donut::events module.
Definition: Error.hpp:13
Error(const char *message)
Definition: Error.hpp:17
Error(const std::string &message)
Definition: Error.hpp:14