11 #define ALEXCPT_FORMAT(x, y, z) __attribute__((format(x, (y), (z))))
13 #define ALEXCPT_FORMAT(x, y, z)
19 class backend_exception final
: public std::exception
{
24 backend_exception(ALCenum code
, const char *msg
, ...) ALEXCPT_FORMAT(printf
, 3,4);
26 const char *what() const noexcept override
{ return mMessage
.c_str(); }
27 ALCenum
errorCode() const noexcept
{ return mErrorCode
; }
32 #define START_API_FUNC try
34 #define END_API_FUNC catch(...) { std::terminate(); }
36 #endif /* ALEXCPT_H */