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_AUDIO_ERROR_HPP
2 #define DONUT_AUDIO_ERROR_HPP
3 
4 #include <stdexcept> // std::runtime_error
5 #include <string> // std::string
6 #include <string_view> // std::string_view
7 
8 namespace donut::audio {
9 
14 struct Error : std::runtime_error {
15  explicit Error(const std::string& message)
16  : std::runtime_error(message) {}
17 
18  explicit Error(const char* message)
19  : std::runtime_error(message) {}
20 
21  Error(std::string_view message, unsigned errorCode);
22 };
23 
24 } // namespace donut::audio
25 
26 #endif
Definition: Error.hpp:8
Exception type for domain-specific errors originating from the donut::audio module.
Definition: Error.hpp:14
Error(const std::string &message)
Definition: Error.hpp:15
Error(const char *message)
Definition: Error.hpp:18
Error(std::string_view message, unsigned errorCode)