From 7d2e21334c5bc6423abed3b450d369829d7c1fde Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Thu, 17 Dec 2020 16:46:21 -0800 Subject: Move the AL error enum out of base_exception --- alc/backends/base.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'alc') 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 -- cgit v1.2.3