You've already forked openal-soft
mirror of
https://github.com/OldUnreal/openal-soft.git
synced 2026-04-02 21:38:01 -07:00
33 lines
753 B
C++
33 lines
753 B
C++
#ifndef CORE_EXCEPT_H
|
|
#define CORE_EXCEPT_H
|
|
|
|
#include <cstdarg>
|
|
#include <exception>
|
|
#include <string>
|
|
#include <utility>
|
|
|
|
|
|
namespace al {
|
|
|
|
class base_exception : public std::exception {
|
|
std::string mMessage;
|
|
|
|
protected:
|
|
auto setMessage(const char *msg, std::va_list args) -> void;
|
|
|
|
public:
|
|
base_exception() = default;
|
|
base_exception(const base_exception&) = default;
|
|
base_exception(base_exception&&) = default;
|
|
~base_exception() override;
|
|
|
|
auto operator=(const base_exception&) -> base_exception& = default;
|
|
auto operator=(base_exception&&) -> base_exception& = default;
|
|
|
|
[[nodiscard]] auto what() const noexcept -> const char* override { return mMessage.c_str(); }
|
|
};
|
|
|
|
} // namespace al
|
|
|
|
#endif /* CORE_EXCEPT_H */
|