mirror of
https://github.com/love2d/megasource.git
synced 2026-08-16 00:02:15 +02:00
28 lines
522 B
C++
28 lines
522 B
C++
#ifndef AL_ERROR_H
|
|
#define AL_ERROR_H
|
|
|
|
#include "AL/al.h"
|
|
|
|
#include "core/except.h"
|
|
|
|
namespace al {
|
|
|
|
class context_error final : public al::base_exception {
|
|
ALenum mErrorCode{};
|
|
|
|
public:
|
|
#ifdef __MINGW32__
|
|
[[gnu::format(__MINGW_PRINTF_FORMAT, 3, 4)]]
|
|
#else
|
|
[[gnu::format(printf, 3, 4)]]
|
|
#endif
|
|
context_error(ALenum code, const char *msg, ...);
|
|
~context_error() final;
|
|
|
|
[[nodiscard]] auto errorCode() const noexcept -> ALenum { return mErrorCode; }
|
|
};
|
|
|
|
} /* namespace al */
|
|
|
|
#endif /* AL_ERROR_H */
|