diff options
author | Viste <viste02@gmail.com> | 2019-12-01 15:13:31 +0300 |
---|---|---|
committer | Francesco Borzì <borzifrancesco@gmail.com> | 2019-12-01 13:13:31 +0100 |
commit | e22d78ecd6997bc11f8620b759364f119dac431a (patch) | |
tree | 42d8a3ddc03ddc7bc50f8ed024ac20b487d08b40 /src/common/Debugging/Errors.h | |
parent | e19e95e5d0c65f1b1e5a0725ee446af9958deb40 (diff) |
refactor(Core): rename namespaces and macros to acore (#2454)
Diffstat (limited to 'src/common/Debugging/Errors.h')
-rw-r--r-- | src/common/Debugging/Errors.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/common/Debugging/Errors.h b/src/common/Debugging/Errors.h index 1edfdcb759..f40aa52d6d 100644 --- a/src/common/Debugging/Errors.h +++ b/src/common/Debugging/Errors.h @@ -10,7 +10,7 @@ #include "Define.h" #include <string> -namespace Trinity +namespace acore { DECLSPEC_NORETURN void Assert(char const* file, int line, char const* function, std::string const& debugInfo, char const* message) ATTR_NORETURN; DECLSPEC_NORETURN void Assert(char const* file, int line, char const* function, std::string const& debugInfo, char const* message, char const* format, ...) ATTR_NORETURN ATTR_PRINTF(6, 7); @@ -25,7 +25,7 @@ namespace Trinity DECLSPEC_NORETURN void AbortHandler(int sigval) ATTR_NORETURN; -} // namespace Trinity +} // namespace acore std::string GetDebugInfo(); @@ -41,12 +41,12 @@ std::string GetDebugInfo(); #define EXCEPTION_ASSERTION_FAILURE 0xC0000420L #endif -#define WPAssert(cond, ...) ASSERT_BEGIN do { if (!(cond)) Trinity::Assert(__FILE__, __LINE__, __FUNCTION__, GetDebugInfo(), #cond, ##__VA_ARGS__); } while(0) ASSERT_END -#define WPAssert_NODEBUGINFO(cond, ...) ASSERT_BEGIN do { if (!(cond)) Trinity::Assert(__FILE__, __LINE__, __FUNCTION__, "", #cond, ##__VA_ARGS__); } while(0) ASSERT_END -#define WPFatal(cond, ...) ASSERT_BEGIN do { if (!(cond)) Trinity::Fatal(__FILE__, __LINE__, __FUNCTION__, ##__VA_ARGS__); } while(0) ASSERT_END -#define WPError(cond, msg) ASSERT_BEGIN do { if (!(cond)) Trinity::Error(__FILE__, __LINE__, __FUNCTION__, (msg)); } while(0) ASSERT_END -#define WPWarning(cond, msg) ASSERT_BEGIN do { if (!(cond)) Trinity::Warning(__FILE__, __LINE__, __FUNCTION__, (msg)); } while(0) ASSERT_END -#define WPAbort() ASSERT_BEGIN do { Trinity::Abort(__FILE__, __LINE__, __FUNCTION__); } while(0) ASSERT_END +#define WPAssert(cond, ...) ASSERT_BEGIN do { if (!(cond)) acore::Assert(__FILE__, __LINE__, __FUNCTION__, GetDebugInfo(), #cond, ##__VA_ARGS__); } while(0) ASSERT_END +#define WPAssert_NODEBUGINFO(cond, ...) ASSERT_BEGIN do { if (!(cond)) acore::Assert(__FILE__, __LINE__, __FUNCTION__, "", #cond, ##__VA_ARGS__); } while(0) ASSERT_END +#define WPFatal(cond, ...) ASSERT_BEGIN do { if (!(cond)) acore::Fatal(__FILE__, __LINE__, __FUNCTION__, ##__VA_ARGS__); } while(0) ASSERT_END +#define WPError(cond, msg) ASSERT_BEGIN do { if (!(cond)) acore::Error(__FILE__, __LINE__, __FUNCTION__, (msg)); } while(0) ASSERT_END +#define WPWarning(cond, msg) ASSERT_BEGIN do { if (!(cond)) acore::Warning(__FILE__, __LINE__, __FUNCTION__, (msg)); } while(0) ASSERT_END +#define WPAbort() ASSERT_BEGIN do { acore::Abort(__FILE__, __LINE__, __FUNCTION__); } while(0) ASSERT_END #ifdef PERFORMANCE_PROFILING #define ASSERT(cond, ...) ((void)0) |