mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/DBLayer: Improve error message from 0a27f8bce2
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user