Core/DBLayer: Improve error message from 0a27f8bce264b8f6d8c55efa8ebc97f6e9cb7d11

(cherry picked from commit d31706b07e5e4a4d632f5deea7076e864b467bbe)
This commit is contained in:
Shauren authored and Carbenium committed 2015-11-14 13:54:36 +01:00
1 parent 1438c841ed
commit 7631ec444e
3 files changed
+12 -6

No files matched your search

+8 -3
View File
@@ -59,10 +59,15 @@ void Assert(char const* file, int line, char const* function, char const* messag
exit(1);
}
void Fatal(char const* file, int line, char const* function, char const* message)
void Fatal(char const* file, int line, char const* function, char const* message, ...)
{
fprintf(stderr, "\n%s:%i in %s FATAL ERROR:\n %s\n",
file, line, function, message);
va_list args;
va_start(args, message);
fprintf(stderr, "\n%s:%i in %s FATAL ERROR:\n ", file, line, function);
vfprintf(stderr, message, args);
fprintf(stderr, "\n");
fflush(stderr);
std::this_thread::sleep_for(std::chrono::seconds(10));
*((volatile int*)NULL) = 0;