Check that AltiVec is enabled before using it
[openal-soft.git] / al / error.h
blobc50011a54143899d08affc16281916a21f85072e
1 #ifndef AL_ERROR_H
2 #define AL_ERROR_H
4 #include "AL/al.h"
6 #include "core/except.h"
8 namespace al {
10 class context_error final : public al::base_exception {
11 ALenum mErrorCode{};
13 public:
14 #ifdef __MINGW32__
15 [[gnu::format(__MINGW_PRINTF_FORMAT, 3, 4)]]
16 #else
17 [[gnu::format(printf, 3, 4)]]
18 #endif
19 context_error(ALenum code, const char *msg, ...);
20 ~context_error() final;
22 [[nodiscard]] auto errorCode() const noexcept -> ALenum { return mErrorCode; }
25 } /* namespace al */
27 #endif /* AL_ERROR_H */