Revert "Core/Server: Catch exceptions in int main()"
This reverts commit 958999ff5c.
Closes #14329
This commit is contained in:
1 parent
acc235a0f8
commit
9948e633ab
2 files changed
+3
-39
No files matched your search
@@ -92,7 +92,8 @@ void ShutdownCLIThread(std::thread* cliThread);
|
||||
void ShutdownThreadPool(std::vector<std::thread>& threadPool);
|
||||
variables_map GetConsoleArguments(int argc, char** argv, std::string& cfg_file, std::string& cfg_service);
|
||||
|
||||
int mainImpl(int argc, char** argv)
|
||||
/// Launch the Trinity server
|
||||
extern int main(int argc, char** argv)
|
||||
{
|
||||
std::string configFile = _TRINITY_CORE_CONFIG;
|
||||
std::string configService;
|
||||
@@ -288,25 +289,6 @@ int mainImpl(int argc, char** argv)
|
||||
return World::GetExitCode();
|
||||
}
|
||||
|
||||
/// Launch the Trinity server
|
||||
extern int main(int argc, char** argv)
|
||||
{
|
||||
try
|
||||
{
|
||||
return mainImpl(argc, argv);
|
||||
}
|
||||
catch (std::exception& ex)
|
||||
{
|
||||
std::cerr << "Top-level exception caught:" << ex.what() << "\n";
|
||||
|
||||
#ifndef NDEBUG // rethrow exception for the debugger
|
||||
throw;
|
||||
#else
|
||||
return 1;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
void ShutdownCLIThread(std::thread* cliThread)
|
||||
{
|
||||
if (cliThread != nullptr)
|
||||
|
||||
Reference in new issue
Block a user