diff options
author | Chris Robinson <[email protected]> | 2020-12-17 16:46:21 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2020-12-17 16:46:21 -0800 |
commit | 7d2e21334c5bc6423abed3b450d369829d7c1fde (patch) | |
tree | 957916bbcb6131be5b35620a9d3b9412f471e8ce /al | |
parent | 4d1ac95ae2ef1ca3a20205b4cc9893b02f0c7c22 (diff) |
Move the AL error enum out of base_exception
Diffstat (limited to 'al')
-rw-r--r-- | al/effect.cpp | 2 | ||||
-rw-r--r-- | al/effects/effects.h | 4 | ||||
-rw-r--r-- | al/filter.cpp | 5 |
3 files changed, 9 insertions, 2 deletions
diff --git a/al/effect.cpp b/al/effect.cpp index 3cfccaa3..029ecaa8 100644 --- a/al/effect.cpp +++ b/al/effect.cpp @@ -72,7 +72,7 @@ const EffectList gEffectList[16]{ bool DisabledEffects[MAX_EFFECTS]; -effect_exception::effect_exception(ALenum code, const char *msg, ...) : base_exception{code} +effect_exception::effect_exception(ALenum code, const char *msg, ...) : mErrorCode{code} { std::va_list args; va_start(args, msg); diff --git a/al/effects/effects.h b/al/effects/effects.h index 1850271b..47b089ba 100644 --- a/al/effects/effects.h +++ b/al/effects/effects.h @@ -9,9 +9,13 @@ union EffectProps; class effect_exception final : public al::base_exception { + ALenum mErrorCode; + public: [[gnu::format(printf, 3, 4)]] effect_exception(ALenum code, const char *msg, ...); + + ALenum errorCode() const noexcept { return mErrorCode; } }; diff --git a/al/filter.cpp b/al/filter.cpp index 447bea7a..2f49c52e 100644 --- a/al/filter.cpp +++ b/al/filter.cpp @@ -48,15 +48,18 @@ namespace { class filter_exception final : public al::base_exception { + ALenum mErrorCode; + public: [[gnu::format(printf, 3, 4)]] - filter_exception(ALenum code, const char *msg, ...) : base_exception{code} + filter_exception(ALenum code, const char *msg, ...) : mErrorCode{code} { std::va_list args; va_start(args, msg); setMessage(msg, args); va_end(args); } + ALenum errorCode() const noexcept { return mErrorCode; } }; #define FILTER_MIN_GAIN 0.0f |