diff options
author | StormBytePP <stormbyte@gmail.com> | 2015-09-21 15:42:56 +0200 |
---|---|---|
committer | StormBytePP <stormbyte@gmail.com> | 2015-09-21 15:52:34 +0200 |
commit | 8ea17647e6bced9d4d027c94ecdc63369cb4c6df (patch) | |
tree | f49cf7b0f97f8c96822eb6e62ac1b6dcfbb64682 /src/common/Debugging/Errors.cpp | |
parent | 958fd013e77f819485f7437091a2ca0a01edb7c6 (diff) |
Core/Build: Added missing abort() calls on error handlers
Diffstat (limited to 'src/common/Debugging/Errors.cpp')
-rw-r--r-- | src/common/Debugging/Errors.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/common/Debugging/Errors.cpp b/src/common/Debugging/Errors.cpp index 454c73d5761..951dd3d8e8c 100644 --- a/src/common/Debugging/Errors.cpp +++ b/src/common/Debugging/Errors.cpp @@ -29,8 +29,7 @@ void Assert(char const* file, int line, char const* function, char const* messag { fprintf(stderr, "\n%s:%i in %s ASSERTION FAILED:\n %s\n", file, line, function, message); - *((volatile int*)NULL) = 0; - exit(1); + abort(); } void Assert(char const* file, int line, char const* function, char const* message, char const* format, ...) @@ -44,8 +43,7 @@ void Assert(char const* file, int line, char const* function, char const* messag fflush(stderr); va_end(args); - *((volatile int*)NULL) = 0; - exit(1); + abort(); } void Fatal(char const* file, int line, char const* function, char const* message) @@ -54,16 +52,14 @@ void Fatal(char const* file, int line, char const* function, char const* message file, line, function, message); std::this_thread::sleep_for(std::chrono::seconds(10)); - *((volatile int*)NULL) = 0; - exit(1); + abort(); } void Error(char const* file, int line, char const* function, char const* message) { fprintf(stderr, "\n%s:%i in %s ERROR:\n %s\n", file, line, function, message); - *((volatile int*)NULL) = 0; - exit(1); + abort(); } void Warning(char const* file, int line, char const* function, char const* message) @@ -76,6 +72,7 @@ void Abort(char const* file, int line, char const* function) { fprintf(stderr, "\n%s:%i in %s ABORTED.\n", file, line, function); + abort(); } } // namespace Trinity |