diff options
Diffstat (limited to 'alc/backends/base.h')
-rw-r--r-- | alc/backends/base.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/alc/backends/base.h b/alc/backends/base.h index 99e2f12b..3a96c446 100644 --- a/alc/backends/base.h +++ b/alc/backends/base.h @@ -94,15 +94,18 @@ protected: namespace al { class backend_exception final : public base_exception { + ALCenum mErrorCode; + public: [[gnu::format(printf, 3, 4)]] - backend_exception(ALCenum code, const char *msg, ...) : base_exception{code} + backend_exception(ALCenum code, const char *msg, ...) : mErrorCode{code} { std::va_list args; va_start(args, msg); setMessage(msg, args); va_end(args); } + ALCenum errorCode() const noexcept { return mErrorCode; } }; } // namespace al |