From 0bed9d56cb9f10979492187c51042802272ce8ed Mon Sep 17 00:00:00 2001 From: StormBytePP Date: Mon, 21 Sep 2015 15:17:05 +0200 Subject: Core: Added ABORT() macro to prevent the usage of ASSERT(false) as a quick hack to crash the core misusing assert --- src/common/Debugging/Errors.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/common/Debugging/Errors.cpp') diff --git a/src/common/Debugging/Errors.cpp b/src/common/Debugging/Errors.cpp index cebd9d4cf2f..4612fcb7910 100644 --- a/src/common/Debugging/Errors.cpp +++ b/src/common/Debugging/Errors.cpp @@ -72,4 +72,10 @@ void Warning(char const* file, int line, char const* function, char const* messa file, line, function, message); } +void Abort(char const* file, int line, char const* function) +{ + fprintf(stderr, "\n%s:%i in %s ABORTED.\n", + file, line, function, message); +} + } // namespace Trinity -- cgit v1.2.3