*/
class CAudioError : public std::exception {
public:
- /* Enums Definition */
enum class EError : unsigned int {
ERROR_NONE,
ERROR_MAX
};
- /* Constants Definition */
- static constexpr unsigned int MSG_LENGTH = 512;
-
- /* Constructor & Destructor */
+ static constexpr auto MSG_LENGTH = 512;
CAudioError(EError err, const char* msg, const char* file, const char* func, int line);
- ~CAudioError() = default;
-
- const char *what() const noexcept override {
- return __mFullMsg.c_str();
- }
+ const char *what() const noexcept override;
const char* getErrorMsg() const noexcept;
- const EError getError() const noexcept;
+ EError getError() const noexcept;
private:
static const char* __convertErrorToString(EError err) noexcept;
EError __mError;
- std::string __mMsg;
- std::string __mFullMsg;
-
+ std::runtime_error __mFullMsg;
};