From 50eb64d331fbaec01c1ae5b8035901b4f1971b5c Mon Sep 17 00:00:00 2001 From: Antonio Martín Berti <15972392+BertiRean@users.noreply.github.com> Date: Wed, 29 May 2024 14:03:37 -0300 Subject: Core/Misc: Remove separate storage for custom messages in exception types and store it directly in base class from (#30012) (cherry picked from commit 15e995b3b3cb7b96048b6b7830285c78bd901fb0) --- src/server/game/AI/AIException.h | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'src/server/game/AI/AIException.h') diff --git a/src/server/game/AI/AIException.h b/src/server/game/AI/AIException.h index 0f39bd78915..c2245174855 100644 --- a/src/server/game/AI/AIException.h +++ b/src/server/game/AI/AIException.h @@ -19,17 +19,12 @@ #define TRINITY_AIEXCEPTION_H #include "Define.h" -#include -#include +#include -class TC_GAME_API InvalidAIException : public std::exception +class TC_GAME_API InvalidAIException : public std::logic_error { public: - InvalidAIException(char const* msg) : msg_(msg) {} - char const* what() const noexcept override { return msg_.c_str(); } - -private: - std::string const msg_; + using std::logic_error::logic_error; }; #endif -- cgit v1.2.3